Created
July 19, 2021 22:55
-
-
Save starlightromero/d194faffe431af2fd2a3aefa788b2736 to your computer and use it in GitHub Desktop.
Python Dockerfile.buster
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
| FROM python:3.9-buster as build | |
| WORKDIR /usr/src/app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip==21.1.2 && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| FROM python:3.9-buster | |
| WORKDIR /usr/src/app | |
| COPY --from=build /usr/src/app . | |
| EXPOSE 8080 | |
| CMD [ "flask", "run", "--host=0.0.0.0", "--port=8080" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment