Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert non-root docker user until further rework #1277

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ RUN pip install --upgrade pip && \
RUN poetry install
RUN rm -rf $POETRY_CACHE_DIR

RUN addgroup -g 1001 -S app && adduser -u 1001 -S -G app app
USER app

ENTRYPOINT ["poetry", "run", "bash", "startup.sh"]
EXPOSE 8000
2 changes: 1 addition & 1 deletion backend/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fi

if [ ! -n "$DJANGO_SECRET_KEY" ]; then
if [ ! -f db/django_secret_key ]; then
install -m 600 <(cat /proc/sys/kernel/random/uuid) db/django_secret_key
cat /proc/sys/kernel/random/uuid >db/django_secret_key
echo "generating initial Django secret key"
fi
export DJANGO_SECRET_KEY=$(<db/django_secret_key)
Expand Down
2 changes: 0 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,5 @@ EXPOSE 3000
ENV NODE_ENV=production
ENV BODY_SIZE_LIMIT=20000000

RUN addgroup -g 1001 -S app && adduser -u 1001 -S -G app app
USER app

CMD [ "node", "server" ]
Loading