From fa1c62629acb073744dcc8a8af7c0c2d580ddf8a Mon Sep 17 00:00:00 2001 From: andros21 Date: Mon, 25 Sep 2023 14:34:14 +0200 Subject: [PATCH] refactor(Dockerfile): unify inter stage with first now `cosign dockerfile verify` can be easily used in CI --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c9d89b0..29e82df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,10 +11,7 @@ WORKDIR /home/nonroot RUN ["/usr/bin/python3", "-m" , "venv", ".venv"] COPY requirements.txt requirements.txt RUN [".venv/bin/pip", "install", "--no-cache-dir", "--disable-pip-version-check", "--require-hashes", "-r", "requirements.txt"] - # Run random walk simulation -# -FROM venv AS rwalker COPY rwalker.py rwalker.py RUN [".venv/bin/python3", "rwalker.py"] @@ -27,6 +24,6 @@ FROM cgr.dev/chainguard/python:latest@sha256:2065a6e52402ba9616ad51d9fbc0c6587d5 WORKDIR /home/nonroot COPY . . COPY --from=venv /home/nonroot/.venv .venv -COPY --from=rwalker /home/nonroot/data /data +COPY --from=venv /home/nonroot/data /data EXPOSE 8080 ENTRYPOINT [".venv/bin/gunicorn", "--bind", ":8080", "--workers", "2", "rwalk:app"]