Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit efb2164

Browse files
committed
Bypass git restriction for performing git operations as different user
1 parent e02b266 commit efb2164

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,11 @@ RUN apk add --no-cache \
88

99
RUN gem install git-pkgs
1010

11+
# The git repository (the mounted directory) has different ownership that the root user of the container.
12+
# Due to an update in git, a different user cannot perform git operations on the mounted directory.
13+
# This command allows the any user to perform git operations on the mounted directory.
14+
RUN git config --system --add safe.directory /mnt
15+
16+
WORKDIR /mnt
17+
1118
ENTRYPOINT ["git", "pkgs"]

0 commit comments

Comments
 (0)