Skip to content

Commit

Permalink
fix: fix premission handling
Browse files Browse the repository at this point in the history
- 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]>
  • Loading branch information
jim60105 committed May 4, 2024
1 parent 694ae35 commit 6ac7ebc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ ARG TARGETVARIANT

# Create user
ARG UID
RUN addgroup -g $UID $UID && \
adduser -H -g "" -D $UID -u $UID -G $UID
RUN adduser -H -g "" -D $UID -u $UID -G root

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

WORKDIR /app
WORKDIR /download

VOLUME [ "/download" ]

Expand Down

0 comments on commit 6ac7ebc

Please sign in to comment.