Skip to content

Instantly share code, notes, and snippets.

@paulonteri
Created May 7, 2020 10:29
Show Gist options
  • Save paulonteri/25a114c5a734de1ab3ce5ce4b75726da to your computer and use it in GitHub Desktop.
Save paulonteri/25a114c5a734de1ab3ce5ce4b75726da to your computer and use it in GitHub Desktop.
Django Dockerfile
# this Dockerfile starts with a Python 3.6 parent image
FROM python:3.6
# this means that Docker won’t buffer the output from your application;
# instead, you will see your output in your console
ENV PYTHONUNBUFFERED 1 # environment variable
# create a directory for our project in the container
RUN mkdir /code
# Set the working directory to /code
WORKDIR /code
# copy the current directory contents (our project files) to /code
COPY . /code/
# install packages
RUN pip install -r requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment