From 12f55056eede8b436930fe4228db42894c35df68 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 23 Jul 2023 17:01:47 +0200 Subject: [PATCH] mastercontainer - run supervisord directly and not as cmd option Signed-off-by: Simon L --- Containers/mastercontainer/Dockerfile | 1 - Containers/mastercontainer/start.sh | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Dockerfile b/Containers/mastercontainer/Dockerfile index cfa76d88..9d1e6818 100644 --- a/Containers/mastercontainer/Dockerfile +++ b/Containers/mastercontainer/Dockerfile @@ -121,6 +121,5 @@ COPY mastercontainer.conf /etc/apache2/sites-available/mastercontainer.conf USER root ENTRYPOINT ["/start.sh"] -CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"] HEALTHCHECK CMD /healthcheck.sh diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index 9e01f256..e0f7cffa 100644 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -26,6 +26,12 @@ if [ "$EUID" != "0" ]; then exit 1 fi +# Check that the CMD is not overwritten nor set +if [ "$*" != "" ]; then + print_red "Docker run command for AIO is incorrect as a CMD option was given which is not expected." + exit 1 +fi + # Check if socket is available and readable if ! [ -a "/var/run/docker.sock" ]; then print_red "Docker socket is not available. Cannot continue." @@ -310,4 +316,7 @@ caddy fmt --overwrite /Caddyfile # Fix caddy log chmod 777 /root +# Start supervisord +/usr/bin/supervisord -c /supervisord.conf + exec "$@"