Created
May 27, 2022 07:14
-
-
Save twyle/dc7f9bc2a2d123381f37005d5324ec09 to your computer and use it in GitHub Desktop.
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-slim AS builder | |
ADD . /app | |
WORKDIR /app | |
# We are installing a dependency here directly into our app source dir | |
RUN /usr/local/bin/python -m pip install --upgrade pip | |
RUN pip install --target=/app -r requirements.txt | |
# A distroless container image with Python and some basics like SSL certificates | |
# https://github.com/GoogleContainerTools/distroless | |
FROM gcr.io/distroless/python3-debian10 | |
COPY --from=builder /app /app | |
WORKDIR /app | |
ENV PYTHONPATH /app | |
CMD ["/app/main.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment