-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·36 lines (27 loc) · 1.19 KB
/
Copy pathDockerfile
File metadata and controls
executable file
·36 lines (27 loc) · 1.19 KB
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
34
35
36
FROM python:3.8.12-slim
## Ensure all output is sent directly to stdout without any buffering
ENV PYTHONUNBUFFERED 1
## Update package lists
## Upgrade all existing packages
## Install the packages required for installing and running the app
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y -q && \
ACCEPT_EULA=Y DEBIAN_FRONTEND=noninteractive apt-get install -y -q git gcc g++ && \
pip install --upgrade pip
## Set up the working directory
WORKDIR /app
## Copy python requirements files
COPY requirements.txt requirements-production.txt ./
## Install python requirements
RUN pip install -r requirements.txt && \
pip install -r requirements-production.txt
## Remove the unnecesary system packages only used for build
RUN apt-get remove -y -q curl gnupg git gcc g++ autoconf automake autotools-dev binutils binutils-common && \
apt-get autoremove -y -q && \
apt-get clean -y -q
## copy the app from the source
COPY . .
## Expose the port we're running on
EXPOSE 5000
## Run the application
ENTRYPOINT ["waitress-serve", "--host=0.0.0.0", "--port=5000", "--no-ipv6", "--url-scheme=http", "--ident=PythonMultiArchTest", "app:app"]