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:
33
etc/docker/install.sh
Executable file
33
etc/docker/install.sh
Executable 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/
|
||||
Reference in New Issue
Block a user