Skip to content

Instantly share code, notes, and snippets.

@Sebuliba-Adrian
Created March 3, 2021 05:47
Show Gist options
  • Save Sebuliba-Adrian/8d1036ef696d49a13f40c73ab12922f3 to your computer and use it in GitHub Desktop.
Save Sebuliba-Adrian/8d1036ef696d49a13f40c73ab12922f3 to your computer and use it in GitHub Desktop.
Dockerfile
FROM python:3.9
# Set environment variables
#Use familiar console instead of docker one
ENV PYTHONDONTWRITEBYTECODE 1
#Avoid .pyc file from getting created by python in the image
ENV PYTHONUNBUFFERED 1
# Declare src as work directory in the docker file system
WORKDIR /src
# Copy dependencies file to the docker file system of which src is part
COPY requirements.txt /src/
#Run pip command to install dependencies
RUN pip install -r requirements.txt
# Copy the rest of the source files over to the docker file system
COPY . /src/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment