leonsimon23 commited on
Commit
0ff2bfc
·
verified ·
1 Parent(s): f216f9c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -6
Dockerfile CHANGED
@@ -1,7 +1,9 @@
1
  FROM python:3.9-slim AS builder
2
 
3
  WORKDIR /build
4
- COPY requirements.txt .
 
 
5
  RUN pip install --no-cache-dir -r requirements.txt
6
 
7
  FROM python:3.9-slim
@@ -11,11 +13,11 @@ WORKDIR /app
11
  # Copy Python packages from builder
12
  COPY --from=builder /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages
13
 
14
- # Copy application files
15
- COPY app.py .
16
- COPY difydev.py .
17
- COPY requirements.txt .
18
- COPY templates templates/
19
 
20
  # Create necessary directories
21
  RUN mkdir -p /app/instance/sessions && \
 
1
  FROM python:3.9-slim AS builder
2
 
3
  WORKDIR /build
4
+
5
+ # Copy all necessary files to builder stage
6
+ COPY . .
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
  FROM python:3.9-slim
 
13
  # Copy Python packages from builder
14
  COPY --from=builder /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages
15
 
16
+ # Copy application files from builder stage
17
+ COPY --from=builder /build/app.py .
18
+ COPY --from=builder /build/difydev.py .
19
+ COPY --from=builder /build/requirements.txt .
20
+ COPY --from=builder /build/templates templates/
21
 
22
  # Create necessary directories
23
  RUN mkdir -p /app/instance/sessions && \