aboutsummaryrefslogtreecommitdiffstats
path: root/docker/root
diff options
context:
space:
mode:
authorPatryk KrawaczyƄski <nfsec@users.noreply.github.com>2023-10-29 02:44:06 +0100
committerGitHub <noreply@github.com>2023-10-29 09:44:06 +0800
commit319414dd82fec916ed5668c198afa1be606d88b4 (patch)
tree71fdea6be9dc397e695ab40353b576283416112a /docker/root
parent8faa38568bd376c3c0f23a365302b646cf62f4b8 (diff)
downloadgitea-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-xdocker/root/usr/bin/entrypoint6
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