From 9f4d9aa0397c02d76906e71c00b1cf06f01f9d00 Mon Sep 17 00:00:00 2001 From: "John N. Milner" Date: Wed, 12 Jul 2023 18:25:26 -0400 Subject: [PATCH] =?UTF-8?q?Override=20Docker=20ENTRYPOINT=20so=20that=20PI?= =?UTF-8?q?D=201=20inside=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the container is correctly assigned to `pm2-runtime`. See and #533 https://github.com/enketo/enketo-express/issues/531#issuecomment-1633255721 --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e550d4c06..71f5500a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,9 @@ VOLUME ${ENKETO_SRC_DIR}/setup/docker/secrets EXPOSE 8005 -CMD ${ENKETO_SRC_DIR}/setup/docker/start.sh +# Override the base image's ENTRYPOINT instead of passing arguments to it using +# CMD, and use the "exec form" to avoid spawning an intermediary shell. +# NB: Docker will not expand environment variables like ENKETO_SRC_DIR within +# the ENTRYPOINT instruction; see +# https://docs.docker.com/engine/reference/builder/#environment-replacement +ENTRYPOINT ["/srv/src/enketo_express/setup/docker/start.sh"]