Create dockerfile
Browse files- dockerfile +20 -0
dockerfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the latest Ubuntu image as the base image
|
| 2 |
+
FROM ubuntu:latest
|
| 3 |
+
|
| 4 |
+
# Update package lists and install necessary packages
|
| 5 |
+
RUN apt-get update && apt-get install -y python3 python3-pip
|
| 6 |
+
|
| 7 |
+
# Set the working directory in the container
|
| 8 |
+
WORKDIR /app
|
| 9 |
+
|
| 10 |
+
# Copy the requirements.txt file into the container
|
| 11 |
+
COPY requirements.txt /app
|
| 12 |
+
|
| 13 |
+
# Install Python dependencies from requirements.txt
|
| 14 |
+
RUN pip3 install flask
|
| 15 |
+
RUN pip3 install gunicorn
|
| 16 |
+
# Copy the rest of the application code into the container
|
| 17 |
+
COPY . /app
|
| 18 |
+
|
| 19 |
+
# Specify the command to run your application
|
| 20 |
+
CMD ["gunicorn", "app:app"]
|