From 4233f4c9aa856fd3f670e89c1ed99897e12f7618 Mon Sep 17 00:00:00 2001 From: Fabrice Brito Date: Fri, 13 Dec 2024 12:36:35 +0100 Subject: [PATCH] fixes container file --- Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4e284d3..ceaf3b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,17 +38,20 @@ RUN chmod +x /usr/bin/hatch USER calrissian # Copy the application files into the /app directory -COPY --chown=1001:0 . /tmp -WORKDIR /tmp +COPY --chown=1001:0 . /app +WORKDIR /app # Set up virtual environment paths ENV VIRTUAL_ENV=/app/envs/calrissian ENV PATH="$VIRTUAL_ENV/bin:$PATH" # Prune any existing environments and create a new production environment -RUN cd /tmp && hatch env prune && \ +RUN hatch env prune && \ hatch env create prod && \ - rm -fr /tmp/* /tmp/.git /tmp/.pytest_cache + hatch run prod:calrissian --help && \ + rm -fr /app/.git /app/.pytest_cache + +RUN hatch run prod:calrissian --help WORKDIR /app