Created
June 1, 2022 06:29
-
-
Save twyle/6e2ebd7164f32549c3fafb26565b189b 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