Created
February 4, 2024 09:34
-
-
Save mark99i/5a99f43eb8956bb2505c673c5b421722 to your computer and use it in GitHub Desktop.
Dockerfile template for Python3 apps
This file contains 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
FROM python:3.12 | |
RUN mkdir /root/app | |
WORKDIR /root/app | |
ENV TZ Europe/Moscow | |
ENV PYTHONDONTWRITEBYTECODE 1 | |
ENV PYTHONUNBUFFERED 1 | |
RUN export PYTHONDONTWRITEBYTECODE=1 | |
RUN export PYTHONUNBUFFERED=1 | |
RUN pip install --no-cache --root-user-action=ignore --upgrade pip | |
COPY ./requirements.txt . | |
RUN pip install --no-cache --root-user-action=ignore -r requirements.txt | |
COPY ./main.py . | |
ENTRYPOINT ["python", "./main.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment