Ability to pass in an additional command to run when the container starts. Undocumented variable. Potential for danger? Of course. But maybe it is useful. Commented use case - up for discussion
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
f31b4694c8
commit
8717bab5c3
|
@ -4,6 +4,14 @@ if [ "${PH_VERBOSE:-0}" -gt 0 ]; then
|
||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Undocumented environment variable to allow easy injection of arbitrary commands.
|
||||||
|
# HERE BE DRAGONS!
|
||||||
|
# Example use case: If mounting the web repo from the host, we need to run `git config --global --add safe.directory /var/www/html/admin`
|
||||||
|
# in order for the updatechecker to work
|
||||||
|
if [ -n "${ADDITIONAL_COMMAND}" ]; then
|
||||||
|
eval "${ADDITIONAL_COMMAND}"
|
||||||
|
fi
|
||||||
|
|
||||||
trap stop TERM INT QUIT HUP ERR
|
trap stop TERM INT QUIT HUP ERR
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
|
Loading…
Reference in New Issue