summaryrefslogtreecommitdiffstats
path: root/root/entrypoint
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-26 05:35:22 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-26 05:35:22 +0200
commit3b663bd61212a92464e015f7e55afd0cbd17b50c (patch)
treef6759c8f853ec0e7bebb0a56731bece0fc447bab /root/entrypoint
parent48c5d2b5acb666f757533af5d1baa379171f36af (diff)
downloadgogs-master.tar.gz
gogs-master.tar.bz2
gogs-master.tar.xz
gogs-master.zip
Don't copy passwd to /data volumeHEADmaster
Diffstat (limited to 'root/entrypoint')
-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