Last active
September 2, 2021 17:11
-
-
Save youngsoul/63e78454199f8290217fab6cb930eae9 to your computer and use it in GitHub Desktop.
Docker file to dockerize a Python project directory
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
| # pull official base image | |
| FROM python:3.9.6 | |
| ENV PYTHONDONTWRITEBYTECODE 1 | |
| ENV PYTHONUNBUFFERED 1 | |
| # Set working directory | |
| WORKDIR /code | |
| # Install Dependencies | |
| RUN pip install --upgrade pip | |
| COPY requirements.txt /code/ | |
| RUN pip install -r requirements.txt | |
| # Copy project code from local into container | |
| COPY . /code/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment