Update Dockerfile
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
|
@@ -1,12 +1,15 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
-
# Install dependencies
|
| 4 |
-
RUN pip install -r requirements.txt
|
| 5 |
-
|
| 6 |
# Create app directory
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
-
# Copy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
COPY . .
|
| 11 |
|
| 12 |
# Run FastAPI
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
# Create app directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Copy requirements first so Docker can cache this step
|
| 7 |
+
COPY requirements.txt .
|
| 8 |
+
|
| 9 |
+
# Install dependencies
|
| 10 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
+
|
| 12 |
+
# Copy the rest of your app
|
| 13 |
COPY . .
|
| 14 |
|
| 15 |
# Run FastAPI
|