From ba0598ed3a38378bc667ab6c9a15108d7a75d7e9 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Tue, 3 Oct 2023 22:34:41 +0200 Subject: [PATCH] #4215 - Ability to specify GID and UID for the user used inside the Docker image - Fix issue that environment variables e.g. containing the database connection parameters are no longer passed to the application --- inception/inception-docker/src/main/docker/Dockerfile | 2 +- inception/inception-docker/src/main/docker/launch.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inception/inception-docker/src/main/docker/Dockerfile b/inception/inception-docker/src/main/docker/Dockerfile index 661e8f5e4ea..5c1ef8896f9 100644 --- a/inception/inception-docker/src/main/docker/Dockerfile +++ b/inception/inception-docker/src/main/docker/Dockerfile @@ -36,7 +36,7 @@ ENV APP_UID=2000 ENV APP_GROUP=inception ENV APP_GID=2000 RUN groupadd -g ${APP_GID} ${APP_GROUP} \ - && useradd -m \ + && useradd \ -d /opt/inception \ -s /bin/bash \ -g ${APP_GROUP} -u ${APP_UID} ${APP_USER} \ diff --git a/inception/inception-docker/src/main/docker/launch.sh b/inception/inception-docker/src/main/docker/launch.sh index aab5c1262cd..e5b34f1bda7 100644 --- a/inception/inception-docker/src/main/docker/launch.sh +++ b/inception/inception-docker/src/main/docker/launch.sh @@ -32,4 +32,4 @@ echo "Launching application..." COMMAND="$(which $1)" shift ARGUMENTS="$(printf "\"%s\" " "$@")" -exec su -l -c "${COMMAND} ${ARGUMENTS}" "$APP_USER" +exec su -p -c "${COMMAND} ${ARGUMENTS}" "$APP_USER"