-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (33 loc) · 831 Bytes
/
Dockerfile
File metadata and controls
36 lines (33 loc) · 831 Bytes
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
# syntax=docker/dockerfile:1
FROM python:3.11-alpine
ENV LANG="C.UTF-8" \
TZ=Asia/Shanghai \
PUID=1000 \
PGID=1000 \
UMASK=022
WORKDIR /app
COPY requirements.txt .
RUN set -ex && \
apk add --no-cache \
bash \
busybox-suid \
su-exec \
shadow \
tini \
openssl \
tzdata && \
python3 -m pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
# Add user
mkdir -p /home/dagent && \
addgroup -S dagent -g 911 && \
adduser -S dagent -G dagent -h /home/dagent -s /sbin/nologin -u 911 && \
# Clear
rm -rf \
/root/.cache \
/tmp/*
COPY . .
COPY --chmod=755 entrypoint.sh /entrypoint.sh
ENTRYPOINT ["tini", "-g", "--", "/entrypoint.sh"]
ENV CONTAINER=1
VOLUME ["/downloads"]