From 3b663bd61212a92464e015f7e55afd0cbd17b50c Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 26 Sep 2019 05:35:22 +0200 Subject: Don't copy passwd to /data volume --- root/entrypoint | 6 +++--- 1 file 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 -- cgit v1.2.3