T
File size: 569 Bytes
4918e41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Use the latest Ubuntu image as the base image
FROM ubuntu:latest

# Update package lists and install necessary packages
RUN apt-get update && apt-get install -y python3 python3-pip

# Set the working directory in the container
WORKDIR /app

# Copy the requirements.txt file into the container
COPY requirements.txt /app

# Install Python dependencies from requirements.txt
RUN pip3 install flask
RUN pip3 install gunicorn
# Copy the rest of the application code into the container
COPY . /app

# Specify the command to run your application
CMD ["gunicorn", "app:app"]