diff options
author | Patryk KrawaczyĆski <nfsec@users.noreply.github.com> | 2023-10-29 02:44:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-29 09:44:06 +0800 |
commit | 319414dd82fec916ed5668c198afa1be606d88b4 (patch) | |
tree | 71fdea6be9dc397e695ab40353b576283416112a /docker/root | |
parent | 8faa38568bd376c3c0f23a365302b646cf62f4b8 (diff) | |
download | gitea-319414dd82fec916ed5668c198afa1be606d88b4.tar.gz gitea-319414dd82fec916ed5668c198afa1be606d88b4.zip |
Dockerfile small refactor (#27757)
- Size and layer optimization,
- Maintaining consistency in definitions (comments, apk etc.),
Diffstat (limited to 'docker/root')
-rwxr-xr-x | docker/root/usr/bin/entrypoint | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docker/root/usr/bin/entrypoint b/docker/root/usr/bin/entrypoint index 0acfec4dbe..d9dbb3ebe0 100755 --- a/docker/root/usr/bin/entrypoint +++ b/docker/root/usr/bin/entrypoint @@ -7,7 +7,7 @@ if [ ! -x /bin/sh ]; then fi if [ "${USER}" != "git" ]; then - # rename user + # Rename user sed -i -e "s/^git\:/${USER}\:/g" /etc/passwd fi @@ -19,13 +19,13 @@ if [ -z "${USER_UID}" ]; then USER_UID="`id -u ${USER}`" fi -## Change GID for USER? +# Change GID for USER? if [ -n "${USER_GID}" ] && [ "${USER_GID}" != "`id -g ${USER}`" ]; then sed -i -e "s/^${USER}:\([^:]*\):[0-9]*/${USER}:\1:${USER_GID}/" /etc/group sed -i -e "s/^${USER}:\([^:]*\):\([0-9]*\):[0-9]*/${USER}:\1:\2:${USER_GID}/" /etc/passwd fi -## Change UID for USER? +# Change UID for USER? if [ -n "${USER_UID}" ] && [ "${USER_UID}" != "`id -u ${USER}`" ]; then sed -i -e "s/^${USER}:\([^:]*\):[0-9]*:\([0-9]*\)/${USER}:\1:${USER_UID}:\2/" /etc/passwd fi |