Skip to content

Instantly share code, notes, and snippets.

@regulad
Last active June 3, 2021 21:35
Show Gist options
  • Save regulad/8da6e965f823155c6c4bd15db803b774 to your computer and use it in GitHub Desktop.
Save regulad/8da6e965f823155c6c4bd15db803b774 to your computer and use it in GitHub Desktop.
Python Dockerfile with Git
# syntax=docker/dockerfile:1
FROM python:3.9.5-slim-buster
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY . .
CMD [ "python", "./main.py"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment