压缩镜像体积

This commit is contained in:
DDSRem
2022-09-24 20:21:38 +08:00
parent 4579cf7a65
commit 15b5172beb

View File

@@ -7,11 +7,16 @@ COPY requirements.txt .
RUN python3 -m pip install --upgrade pip \
&& pip install -r requirements.txt --prefix="/install"
FROM python:3.10-alpine AS permission
COPY --from=build --chmod=777 /install /usr/local
RUN chmod -R 777 /usr/local
FROM python:3.10-alpine
WORKDIR /src
COPY --from=build --chmod=777 /install /usr/local
COPY --from=permission --chmod=777 /usr/local /usr/local
ADD ./src /src
RUN apk add --update --no-cache \
@@ -23,7 +28,6 @@ RUN addgroup -S auto_bangumi && \
adduser -S auto_bangumi -G auto_bangumi -h /home/auto_bangumi && \
usermod -s /bin/bash auto_bangumi && \
mkdir -p "/config" && \
chmod -R 777 /usr/local && \
chmod a+x run.sh && \
chmod a+x getWebUI.sh