Created
August 19, 2018 23:32
-
-
Save bulkan/fc2a3dd4ef22bb3dc9920fda4eb30c16 to your computer and use it in GitHub Desktop.
Django sample Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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