Skip to content

Commit 6ac7ebc

Browse files
committed
fix: fix premission handling
- Change the Dockerfile to create the user directly under the root group - Alter the Dockerfile to change the working directory from /app to /download - Modify Dockerfile to remove unnecessary instructions for group creation Signed-off-by: 陳鈞 <[email protected]>
1 parent 694ae35 commit 6ac7ebc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ ARG TARGETVARIANT
4040

4141
# Create user
4242
ARG UID
43-
RUN addgroup -g $UID $UID && \
44-
adduser -H -g "" -D $UID -u $UID -G $UID
43+
RUN adduser -H -g "" -D $UID -u $UID -G root
4544

4645
# Create directories with correct permissions
4746
RUN install -d -m 775 -o $UID -g 0 /download && \
@@ -68,7 +67,7 @@ RUN --mount=type=cache,id=apk-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/v
6867
# Remove these to prevent the container from executing arbitrary commands
6968
RUN rm /bin/echo /bin/ln /bin/rm /bin/sh
7069

71-
WORKDIR /app
70+
WORKDIR /download
7271

7372
VOLUME [ "/download" ]
7473

0 commit comments

Comments
 (0)