summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xroot/entrypoint6
1 files changed, 3 insertions, 3 deletions
diff --git a/root/entrypoint b/root/entrypoint
index 3103845..bf641a5 100755
--- a/root/entrypoint
+++ b/root/entrypoint
@@ -4,9 +4,9 @@ export HOME=/data
export USER_ID=$(id -u)
export GROUP_ID=$(id -g)
-grep -v ^git /etc/passwd > "$HOME/passwd"
-echo "gogs:x:${USER_ID}:${GROUP_ID}:gogs.io user:${HOME}:/bin/bash" >> "$HOME/passwd"
-cat "$HOME/passwd" > /etc/passwd
+grep -v "^\(git\|gogs\)" /etc/passwd > "/tmp/passwd"
+echo "gogs:x:${USER_ID}:${GROUP_ID}:gogs.io user:${HOME}:/bin/bash" >> "/tmp/passwd"
+cat "/tmp/passwd" > /etc/passwd
#No nss_wrapper in Alpine Linux yet
#export LD_PRELOAD=libnss_wrapper.so