Skip to content

Commit

Permalink
fix(openchallenges): fix openchallenges-edam-etl image (Sage-Bionetwo…
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter authored Mar 22, 2024
1 parent e74d8b8 commit 75f9d51
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions apps/openchallenges/edam-etl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
FROM python:3.12.0-slim

ENV APP_DIR=/opt/app
ARG USERNAME=app
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ENV APP_DIR=/opt/app \
APP_USERNAME=${USERNAME}

RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
# Install sudo
&& apt-get update -qq -y && export DEBIAN_FRONTEND=noninteractive \
&& apt-get install --no-install-recommends -qq -y \
gosu \
&& apt-get -y autoclean \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*

WORKDIR ${APP_DIR}
COPY src src/
Expand All @@ -19,4 +33,4 @@ RUN chmod +x docker-entrypoint.sh

ENTRYPOINT ["/docker-entrypoint.sh"]

CMD ["python", "${APP_DIR}/src/main.py"]
CMD ["python", "src/main.py"]
2 changes: 1 addition & 1 deletion apps/openchallenges/edam-etl/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

if [ "$1" = 'python' ]; then
cd ${APP_DIR}
exec gosu www-data "$@"
exec gosu "$APP_USERNAME" "$@"
fi

exec "$@"

0 comments on commit 75f9d51

Please sign in to comment.