Skip to content

Commit 589e8e6

Browse files
committed
fix: Changing Dockefile to be more maintainable
1 parent 52b47c7 commit 589e8e6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Dockerfile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,8 @@ COPY requirements.txt .
4545
RUN pip install --no-cache-dir --no-index --find-links /app/wheelhouse -r requirements.txt && \
4646
rm -rf /app/wheelhouse
4747

48-
# Copy application source code
49-
COPY app/main.py ./
50-
COPY app/databases/ ./databases/
51-
COPY app/models/ ./models/
52-
COPY app/routes/ ./routes/
53-
COPY app/schemas/ ./schemas/
54-
COPY app/services/ ./services/
48+
# Copy entire app package with correct ownership
49+
COPY --chown=fastapi:fastapi app/ ./app/
5550

5651
# https://rules.sonarsource.com/docker/RSPEC-6504/
5752

0 commit comments

Comments
 (0)