Create Dockerfile
Browse files- Dockerfile +18 -0
Dockerfile
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use a base Python image
|
| 2 |
+
FROM python:3.9-slim-buster
|
| 3 |
+
|
| 4 |
+
# Set the working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy the requirements file and install dependencies
|
| 8 |
+
COPY requirements.txt .
|
| 9 |
+
RUN pip install -r requirements.txt
|
| 10 |
+
|
| 11 |
+
# Copy your Flask application files
|
| 12 |
+
COPY . .
|
| 13 |
+
|
| 14 |
+
# Expose the port your Flask app will run on (default is 5000)
|
| 15 |
+
EXPOSE 5000
|
| 16 |
+
|
| 17 |
+
# Command to run your Flask application
|
| 18 |
+
CMD ["flask", "run", "--host=0.0.0.0", "--port=5000"]
|