Skip to content

Instantly share code, notes, and snippets.

@bulkan
Created August 19, 2018 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bulkan/fc2a3dd4ef22bb3dc9920fda4eb30c16 to your computer and use it in GitHub Desktop.
Save bulkan/fc2a3dd4ef22bb3dc9920fda4eb30c16 to your computer and use it in GitHub Desktop.
Django sample Dockerfile
FROM python:3.6
ENV PYTHONUNBUFFERED 1
RUN groupadd -g 1001 -r django && useradd -m -u 1001 -r -g django django
WORKDIR /opt/project
USER root
ENV FILESYSTEM_ROOT /opt/project
COPY ./requirements.txt /opt/project/requirements.txt
RUN pip install pip --upgrade
RUN pip install -r requirements.txt
COPY --chown django:django . /opt/project
USER django
RUN ./manage.py collectstatic --noinput
CMD "/opt/project/entrypoint.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment