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

changed python base image to slim and added groups for security #786

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3
FROM python:3.7.0-slim
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y netcat
RUN mkdir /code
Expand All @@ -8,4 +8,11 @@ RUN pip install -r requirements.txt
ADD . /code/
ADD wait.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/wait.sh

RUN groupadd rescue-kerela && \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The images are only used for local dev and not deployed at all. So it is unnecessary to add groups/users.

useradd -g rescue-kerela rescue-kerela
RUN chown -R rescue-kerela /code

USER rescue-kerela

ENTRYPOINT ["/usr/local/bin/wait.sh"]