-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (23 loc) · 938 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
31
32
33
FROM python:3.9.5-slim-buster
LABEL maintainer "Colas Droin, [email protected]"
# set working directory in container
WORKDIR /usr/src/app
# Install Python dependencies and Gunicorn and other needed dependencies
RUN apt-get update -y && apt-get install -y gcc
ADD requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Bug with Werkzeug
RUN pip install Werkzeug==2.0.0
# Bug with Flask
RUN pip install Flask==2.1.3
# Copy app folder to app folder in container
COPY . /usr/src/app/
# Finally, run gunicorn.
CMD [ "gunicorn", "main:server", "--bind", "0.0.0.0:8050", "--workers=1", "--threads=4", "--worker-class", "gevent" ]
# To build the app, use the commande below:
# docker build -t lbae_app .
# If there's a bug because of files starting with . or ._, use the following command:
# dot_clean -n .
# To run the app, use the command below
# docker run -p 8051:8050 lbae_app