From 7435acbd70f20e49bb2ec8203789aa1e98d269a2 Mon Sep 17 00:00:00 2001 From: Robert Alonso <17463757+rgalonso@users.noreply.github.com> Date: Fri, 25 Oct 2024 15:56:44 +0000 Subject: [PATCH] feat: add additional Dockerfile target Add additional, non-default, Dockerfile target which installs app into an ubuntu image. This is useful for local development and enables other operations (such as committing back to the repo) to occur within the container. --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5ab27cf..184cec7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,13 @@ RUN pip install --target=/app requests RUN pip install --target=/app -U pip setuptools wheel RUN pip install --target=/app ruamel.yaml +FROM ubuntu AS ubuntu-runtime +RUN apt update -y && apt install -y python3 git +COPY --from=builder /app /app +WORKDIR /app +ENV PYTHONPATH /app +CMD ["python3", "/app/main.py"] + FROM gcr.io/distroless/python3-debian12 COPY --from=builder /app /app WORKDIR /app