-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (39 loc) · 1.08 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM python:3.8-slim
LABEL [email protected] \
vendor=puzl.ee
ENV USER=ubuntu \
UID=1000 \
GID=1000
SHELL ["/bin/bash", "-c"]
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ARG TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/local/bin/tini
RUN addgroup --gid "$GID" "$USER" \
&& adduser \
--disabled-password \
--gecos "" \
--ingroup "$USER" \
--uid "$UID" \
--shell /bin/bash \
"$USER"
COPY . /usr/src/app/
WORKDIR /usr/src/app/
RUN python3 -m pip install -r requirements.txt \
&& chown $USER:$USER /usr/src/app \
&& chmod +x /usr/local/bin/*
RUN apt-get remove -y \
build-essential \
&& apt-get clean \
&& apt-get autoclean -y \
&& apt-get autoremove -y \
&& rm -rf \
/var/cache/debconf \
/tmp/*
USER $UID
EXPOSE 1616
ENTRYPOINT ["/usr/local/bin/tini", "--"]
CMD ["python3", "app.py"]