Upload 5 files
Browse files- Dockerfile +14 -2
Dockerfile
CHANGED
|
@@ -4,12 +4,24 @@ FROM python:3.9-slim
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy the
|
| 8 |
-
COPY .
|
| 9 |
|
| 10 |
# Install any needed packages specified in requirements.txt
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# Make port 8000 available to the world outside this container
|
| 14 |
EXPOSE 8000
|
| 15 |
|
|
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy the Python requirements file into the container
|
| 8 |
+
COPY requirements.txt .
|
| 9 |
|
| 10 |
# Install any needed packages specified in requirements.txt
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Copy the backend Python script
|
| 14 |
+
COPY app.py .
|
| 15 |
+
|
| 16 |
+
# Create directories for templates and static files
|
| 17 |
+
RUN mkdir templates static
|
| 18 |
+
|
| 19 |
+
# Copy the HTML template
|
| 20 |
+
COPY templates/index.html templates/
|
| 21 |
+
|
| 22 |
+
# Copy the JavaScript file
|
| 23 |
+
COPY static/script.js static/
|
| 24 |
+
|
| 25 |
# Make port 8000 available to the world outside this container
|
| 26 |
EXPOSE 8000
|
| 27 |
|