-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathdockerfile
More file actions
30 lines (22 loc) · 700 Bytes
/
dockerfile
File metadata and controls
30 lines (22 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Use Ubuntu as the base image
FROM ubuntu:22.04
# Update package lists and install Python 3.10 and pip
RUN apt-get update && \
apt-get install -y python3.10 python3-pip
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file first to leverage Docker cache
COPY requirements.txt .
# Install Python dependencies
RUN pip3 install -r requirements.txt
# Copy the application files and folders
COPY app.py /app/
ENV FLASK_APP=app.py
COPY images/ /app/images/
COPY templates/ /app/templates/
# Expose the port on which your Flask app runs
EXPOSE 5000
# Run the Flask application
#CMD ["python3", "app.py"]
ENTRYPOINT [ "flask"]
CMD [ "run", "--host", "0.0.0.0" ]