Skip to content

Commit

Permalink
fixes container file
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricebrito committed Dec 13, 2024
1 parent bab988b commit 4233f4c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4233f4c

Please sign in to comment.