1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2026-01-28 14:05:57 +00:00

Docker image should run non-root (#153)

Changed the Dockerfile so that there is a Inbucket user (and group). This will allow the container to be executed a the Inbucket user in stead of ROOT (security best practices)

If the user wants to use a different greeting.html file he can use the environment variable to define a different one. For now we just use the greeting.html from the defaults directory.

* Permissions for /start-inbucket.sh file
* Added timezone data so you can set the timezone in the image
* Updated Docker greeting.html file to include some basic instructions
* Updated to alpine 3.11
* Updated to golang 1.14
* Updated the required packages
This commit is contained in:
Martijn Suijlen
2020-06-26 17:38:27 +02:00
committed by GitHub
parent 62dd540be5
commit 3372ade61b
3 changed files with 33 additions and 25 deletions

View File

@@ -3,22 +3,7 @@
# description: start inbucket (runs within a docker container)
INBUCKET_HOME="/opt/inbucket"
CONF_SOURCE="$INBUCKET_HOME/defaults"
CONF_TARGET="/config"
set -eo pipefail
install_default_config() {
local file="$1"
local source="$CONF_SOURCE/$file"
local target="$CONF_TARGET/$file"
if [ ! -e "$target" ]; then
echo "Installing default $file to $CONF_TARGET"
install "$source" "$target"
fi
}
install_default_config "greeting.html"
exec "$INBUCKET_HOME/bin/inbucket" $*