-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (29 loc) · 1.03 KB
/
Dockerfile
File metadata and controls
38 lines (29 loc) · 1.03 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
37
38
FROM python:3.9.18-slim
LABEL maintainer="Sitt Guruvanich <aekazitt+github@gmail.com> (@aekasitt)"
### Parse Arguments ###
ARG WEB_CONCURRENCY
ENV WEB_CONCURRENCY=${WEB_CONCURRENCY:-5}
### Get Certificates for HTTP requests ###
RUN apt update \
&& apt install -y --no-install-recommends ca-certificates
### Add source-code to targeted build ###
WORKDIR /usr/src/app
ADD . .
### Set up Package Manager for Python dependencies ###
RUN pip install --upgrade pip \
&& pip install --no-cache-dir poetry \
&& poetry config virtualenvs.create false \
&& poetry install
### Get Certificates for HTTP requests ###
RUN apt update \
&& apt install -y --no-install-recommends ca-certificates
### Get pgrep and pkill commands ###
RUN apt install -y --no-install-recommends procps
### Create Entrypoint and default command ###
RUN mv entrypoint.sh /usr/local/bin/
### Give execution rights to entrypoint script ###
RUN chmod 0744 /usr/local/bin/*
### Expose Webserver Port ###
ENV PORT=8080
EXPOSE 8080
ENTRYPOINT [ "entrypoint.sh" ]