forked from EstrellaXD/Auto_Bangumi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (22 loc) · 760 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
FROM alpine:3.20 AS base
RUN apk add --no-cache --update bash python3 su-exec shadow tini tzdata && \
mkdir -p /home/ab && \
addgroup -S ab -g 911 && \
adduser -S ab -G ab -h /home/ab -s /sbin/nologin -u 911
FROM base AS builder
RUN apk add --no-cache --update py3-pip
COPY backend/requirements.lock .
RUN PYTHONDONTWRITEBYTECODE=1 pip install --break-system-packages --user -r requirements.lock
FROM base
ENV LANG="C.UTF-8" \
TZ=Asia/Shanghai \
PUID=1000 \
PGID=1000 \
UMASK=022
WORKDIR /app
COPY --from=builder /root/.local /home/ab/.local
COPY --chmod=755 backend/src/. .
COPY --chmod=755 entrypoint.sh /entrypoint.sh
ENTRYPOINT ["tini", "-g", "--", "/entrypoint.sh"]
EXPOSE 7892
VOLUME [ "/app/config" , "/app/data" ]