Skip to content

Commit

Permalink
Fix git safe directory (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
floryn90 authored Sep 21, 2024
2 parents f676aef + 54d1872 commit ee8c85f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/docker/_imports/default_nonroot_user.df
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# Create a custom user with UID 1234 and GID 1234
RUN getent group hugo 2>&1 > /dev/null || groupadd -g 1234 hugo && \
getent passwd hugo 2>&1 > /dev/null || useradd -m -u 1234 -g hugo hugo \
&& chown -R hugo /src \
&& chown -R hugo /target
getent passwd hugo 2>&1 > /dev/null || useradd -m -u 1234 -g hugo hugo
# && chown -R hugo /src \
# && chown -R hugo /target \
# add /src to safe.directory
#&& git config --global --add safe.directory /src

6 changes: 3 additions & 3 deletions src/docker/_imports/default_nonroot_user_alpine.df
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN getent group hugo 2>&1 > /dev/null || addgroup -g 1234 hugo \
&& getent passwd hugo 2>&1 > /dev/null || adduser -u 1234 -D -H -G hugo -g "" hugo \
&& chown -R hugo /src \
&& chown -R hugo /target
&& getent passwd hugo 2>&1 > /dev/null || adduser -u 1234 -D -H -G hugo -g "" hugo
# && chown -R hugo /src \
# && chown -R hugo /target

0 comments on commit ee8c85f

Please sign in to comment.