diff --git a/docker/Dockerfile b/docker/Dockerfile index 68bcb726..7905c2b9 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,13 +1,15 @@ -FROM python:3.9 as build-env +FROM cgr.dev/chainguard/python:latest-dev as build-env WORKDIR /app -COPY ../app/requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt +RUN pip3 install --no-cache-dir pip==23.3 setuptools==65.5.1 +COPY app/requirements.txt . +RUN pip3 install --upgrade pip && pip install --no-cache-dir -r requirements.txt +RUN pip3 list && sleep 20 -FROM gcr.io/distroless/python3-debian10 +FROM cgr.dev/chainguard/python:latest WORKDIR /app -COPY --from=build-env /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages +COPY --from=build-env /home/nonroot/.local/lib/python3.11/site-packages /home/nonroot/.local/lib/python3.11/site-packages COPY ../app/app.py . COPY ../app/static/ static/ COPY ../app/templates/ templates/ -CMD ["app.py"] - +#CMD ["app.py"] +ENTRYPOINT ["flask", "run", "--host=0.0.0.0"]