Skip to content

Commit

Permalink
Refactor Dockerfile to copy the entire application code and improve c…
Browse files Browse the repository at this point in the history
…ode organization
  • Loading branch information
VikramxD committed Oct 17, 2024
1 parent 0c21a3c commit 1d3303a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions DockerFileFolder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,13 @@ ENV PATH="/home/user/venv/bin:$PATH"
# Switch to the non-root user
USER user

# Copy requirements file
COPY --chown=user:user api/requirements.txt /app/api/requirements.txt
# Copy the entire application code
COPY --chown=user:user . /app

# Install Python dependencies
RUN pip install --no-cache-dir -U pip setuptools wheel
RUN pip install --no-cache-dir -U -r /app/api/requirements.txt

# Copy the rest of the application code
COPY --chown=user:user . /app

# Install the application in editable mode
RUN pip install --no-cache-dir -e .

Expand Down

0 comments on commit 1d3303a

Please sign in to comment.