1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2026-05-14 17:43:49 +00:00

More Docker work

- Dockerfile now builds Inbucket inside the container
- Add starter inbucket.conf for Docker
- Add install.sh to build inbucket inside container
- Add customized greeting.html for Docker
This commit is contained in:
James Hillyerd
2014-05-25 16:10:05 -07:00
parent cb487c3c7b
commit bb398498d4
5 changed files with 178 additions and 16 deletions

33
etc/docker/install.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/sh
# install.sh
# description: Build, test, and install Inbucket. Should be executed inside a Docker container.
# Note: we assume there are no spaces in dir paths
installdir=${INBUCKET_HOME}
srcdir=${INBUCKET_SRC}
bindir=$installdir/bin
# Setup
export GOBIN=$bindir
builddate="$(date --iso-8601=seconds)"
set -e
cd $srcdir
go clean
# Build
echo "### Fetching Dependencies"
go get -d -v ./...
go get -v github.com/stretchr/testify
echo "### Testing Inbucket"
go test ./...
echo "### Building Inbucket"
mkdir -p $bindir
go build -o inbucket -race -ldflags "-X main.BUILD_DATE '$builddate'" -v .
echo "### Installing Inbucket"
mv inbucket $bindir
install etc/docker/inbucket.conf /etc/opt/inbucket.conf
install etc/docker/greeting.html /etc/opt/inbucket-greeting.html
cp -r themes $installdir/