diff options
Diffstat (limited to 'root/entrypoint')
-rwxr-xr-x | root/entrypoint | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/root/entrypoint b/root/entrypoint new file mode 100755 index 0000000..9845a77 --- /dev/null +++ b/root/entrypoint @@ -0,0 +1,20 @@ +#! /bin/sh + +export USER=git +export HOME=/data +export USER_ID=$(id -u) +export GROUP_ID=$(id -g) + +grep -v ^git /etc/passwd > "$HOME/passwd" +echo "git:x:${USER_ID}:${GROUP_ID}:gogs.io user:${HOME}:/bin/bash" >> "$HOME/passwd" +cat "$HOME/passwd" > /etc/passwd + +#No nss_wrapper in Alpine Linux yet +#export LD_PRELOAD=libnss_wrapper.so +#export NSS_WRAPPER_PASSWD=${HOME}/passwd +#export NSS_WRAPPER_GROUP=/etc/group +#export PORT=3000 + +mkdir -p /data/gogs/data /data/gogs/conf /data/gogs/log /data/git /data/ssh + +exec "$@" |