Skip to content

Commit b449312

Browse files
authored
fix(docker_release): avoid duplicate occupation in docker image (#8393 close #8388)
* fix(ci): modify the method of adding permissions * fix(build): modify the method of adding permissions(to keep up with ci)
1 parent 52d4e8e commit b449312

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ RUN apk update && \
3232
/opt/aria2/.aria2/tracker.sh ; \
3333
rm -rf /var/cache/apk/*
3434

35-
COPY --from=builder /app/bin/alist ./
36-
COPY entrypoint.sh /entrypoint.sh
37-
RUN chmod +x /opt/alist/alist && \
38-
chmod +x /entrypoint.sh && /entrypoint.sh version
35+
COPY --chmod=755 --from=builder /app/bin/alist ./
36+
COPY --chmod=755 entrypoint.sh /entrypoint.sh
37+
RUN /entrypoint.sh version
3938

4039
ENV PUID=0 PGID=0 UMASK=022 RUN_ARIA2=${INSTALL_ARIA2}
4140
VOLUME /opt/alist/data/

Dockerfile.ci

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ RUN apk update && \
2424
/opt/aria2/.aria2/tracker.sh ; \
2525
rm -rf /var/cache/apk/*
2626

27-
COPY /build/${TARGETPLATFORM}/alist ./
28-
COPY entrypoint.sh /entrypoint.sh
29-
RUN chmod +x /opt/alist/alist && \
30-
chmod +x /entrypoint.sh && /entrypoint.sh version
27+
COPY --chmod=755 /build/${TARGETPLATFORM}/alist ./
28+
COPY --chmod=755 entrypoint.sh /entrypoint.sh
29+
RUN /entrypoint.sh version
3130

3231
ENV PUID=0 PGID=0 UMASK=022 RUN_ARIA2=${INSTALL_ARIA2}
3332
VOLUME /opt/alist/data/

0 commit comments

Comments
 (0)