Skip to content

Instantly share code, notes, and snippets.

@mvoitko
Last active July 23, 2019 12:30
Show Gist options
  • Save mvoitko/9145ab28f2f8e17e2ff329519f032405 to your computer and use it in GitHub Desktop.
Save mvoitko/9145ab28f2f8e17e2ff329519f032405 to your computer and use it in GitHub Desktop.
Python Project Dockerfile template
FROM python:3.7.3-stretch
COPY app /app
RUN pip install pip==19.0.3
RUN pip install poetry==1.0.0a2
RUN source $HOME/.poetry/env
RUN poetry install
RUN useradd --create-home appuser
WORKDIR /home/appuser
USER appuse
CMD [ "python", "./yourscript.py" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment