-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
30 lines (25 loc) · 840 Bytes
/
Dockerfile
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
#Download Python from DockerHub and use it
FROM python:3.9
#Set the working directory in the Docker container
WORKDIR /srv/flagtrafo-app
#Copy the configuration files to the working directory
COPY requirements-production.txt .
COPY requirements.txt .
COPY start.sh .
COPY uwsgi.ini .
#Copy the Flask app code to the working directory
COPY src/ .
#Install nginx web server
RUN apt-get clean \
&& apt-get -y update
RUN apt-get -y install nginx \
&& apt-get -y install python3-dev \
&& apt-get -y install build-essential
#Install the dependencies
RUN pip install -r requirements-production.txt --src /usr/local/src
#Copy nginx configuration file to the nginx folder
COPY nginx.conf /etc/nginx
# Make the start file executable
RUN chmod +x ./start.sh
# What to do when the container is run: Execute start.sh
CMD ["./start.sh"]