diff --git a/Dockerfile b/Dockerfile index e2f314a..507e9a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Docker build file for Inbucket, see https://www.docker.io/ # Inbucket website: http://www.inbucket.org/ -FROM crosbymichael/golang +FROM golang:1.5 MAINTAINER James Hillyerd, @jameshillyerd # Configuration (WORKDIR doesn't support env vars) diff --git a/docker-run.sh b/etc/docker/docker-run.sh similarity index 76% rename from docker-run.sh rename to etc/docker/docker-run.sh index 115858b..9703c86 100755 --- a/docker-run.sh +++ b/etc/docker/docker-run.sh @@ -2,8 +2,4 @@ # docker-run.sh # description: Launch Inbucket's docker image -if [ "$UID" -ne 0 ]; then - sudo $0 "$@" -fi - docker run -p 9000:10080 -p 2500:10025 -p 1100:10110 jhillyerd/inbucket diff --git a/etc/docker/install.sh b/etc/docker/install.sh index 070d6d9..6e0b804 100755 --- a/etc/docker/install.sh +++ b/etc/docker/install.sh @@ -1,17 +1,17 @@ -#!/bin/sh +#!/bin/bash # 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 +set -eo pipefail + +installdir="${INBUCKET_HOME}" +srcdir="${INBUCKET_SRC}" +bindir="$installdir/bin" # Setup -export GOBIN=$bindir +export GOBIN="$bindir" builddate="$(date --iso-8601=seconds)" -set -e -cd $srcdir +cd "$srcdir" go clean # Build @@ -23,11 +23,11 @@ echo "### Testing Inbucket" go test ./... echo "### Building Inbucket" -mkdir -p $bindir -go build -o inbucket -race -ldflags "-X main.BUILD_DATE '$builddate'" -v . +mkdir -p "$bindir" +go build -o inbucket -race -ldflags "-X 'main.BUILD_DATE=$builddate'" -v . echo "### Installing Inbucket" -mv inbucket $bindir +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/ +cp -r themes "$installdir/" diff --git a/themes/bootstrap/templates/root/status.html b/themes/bootstrap/templates/root/status.html index cbe4099..51d2558 100644 --- a/themes/bootstrap/templates/root/status.html +++ b/themes/bootstrap/templates/root/status.html @@ -37,19 +37,19 @@ $(document).ready(