Created
August 7, 2018 10:01
-
-
Save FGtatsuro/717f492277c9be2e3bf19e94226a5c9c to your computer and use it in GitHub Desktop.
Dockerfile template for Python
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
# FYI: | |
# - https://docs.docker.com/engine/reference/builder/ | |
# - https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ | |
# - https://hub.docker.com/_/python/ | |
FROM python:3.7 | |
# Backward compatibility with deprecate onbuild image. | |
# FYI: https://github.com/docker-library/python/pull/314/files#diff-7531449f9a1a85f134eba7d960a91c91L1 | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY requirements.txt /usr/src/app/ | |
RUN pip install --no-cache-dir -r requirements.txt | |
COPY . /usr/src/app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment