From f0473c5d6576439fbe7b83497ab68c6b906b262d Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Thu, 30 Nov 2023 15:18:01 -0800 Subject: [PATCH] docker: Give example of non-discard domain in greeting (#453) Signed-off-by: James Hillyerd --- etc/docker/defaults/greeting.html | 6 ++++-- etc/docker/docker-run.sh | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/etc/docker/defaults/greeting.html b/etc/docker/defaults/greeting.html index 88b22fd..6277e7c 100644 --- a/etc/docker/defaults/greeting.html +++ b/etc/docker/defaults/greeting.html @@ -13,5 +13,7 @@ of 300 messages per mailbox - the oldest messages will be deleted to stay under that limit.

Messages addressed to any recipient in the @bitbucket.local -domain will be accepted but not written to disk. Use this domain for load or -soak testing your application.

+domain will be accepted, but immediately discarded without being written +to disk. Use this domain for load or soak testing your application. Inbucket +will retain mail for any other domain by default, i.e. +@inbucket.local.

diff --git a/etc/docker/docker-run.sh b/etc/docker/docker-run.sh index 8c92e8b..cd52469 100755 --- a/etc/docker/docker-run.sh +++ b/etc/docker/docker-run.sh @@ -25,6 +25,9 @@ main() { usage exit ;; + -b) + build + ;; -r) reset ;; @@ -38,6 +41,8 @@ main() { esac done + set -x + docker run $run_opts \ -p $PORT_HTTP:9000 \ -p $PORT_SMTP:2500 \ @@ -49,14 +54,21 @@ main() { usage() { echo "$0 [options]" 2>&1 + echo " -b build - build image before starting" 2>&1 echo " -d detach - detach and print container ID" 2>&1 echo " -r reset - purge config and data before startup" 2>&1 echo " -h help - print this message" 2>&1 } +build() { + echo "Building $IMAGE" + docker build . -t "$IMAGE" + echo +} + reset() { - /bin/rm -rf "$VOL_CONFIG" - /bin/rm -rf "$VOL_DATA" + rm -rf "$VOL_CONFIG" + rm -rf "$VOL_DATA" } main $*