From 7075a77a594416c95e56f5613a0622d6bbd26357 Mon Sep 17 00:00:00 2001 From: Martin Michaelis Date: Fri, 9 Apr 2021 11:46:42 +0200 Subject: [PATCH 1/2] Remove random password of git user in dockerfile --- Dockerfile | 2 +- Dockerfile.rootless | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e57b93d1ae72..3445544a94c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,7 @@ RUN addgroup \ -u 1000 \ -G git \ git && \ - echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd + echo "git:*" | chpasswd -e ENV USER git ENV GITEA_CUSTOM /data/gitea diff --git a/Dockerfile.rootless b/Dockerfile.rootless index e91720dd5f33..801db4247edb 100644 --- a/Dockerfile.rootless +++ b/Dockerfile.rootless @@ -47,7 +47,7 @@ RUN addgroup \ -u 1000 \ -G git \ git && \ - echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd + echo "git:*" | chpasswd -e RUN mkdir -p /var/lib/gitea /etc/gitea RUN chown git:git /var/lib/gitea /etc/gitea From 04390f5328fac30048e629d2db455e5cfbfec93c Mon Sep 17 00:00:00 2001 From: Martin Michaelis Date: Fri, 9 Apr 2021 11:50:40 +0200 Subject: [PATCH 2/2] Disable git user account in rootless dockerfile --- Dockerfile.rootless | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile.rootless b/Dockerfile.rootless index 801db4247edb..a379babc2d9a 100644 --- a/Dockerfile.rootless +++ b/Dockerfile.rootless @@ -46,8 +46,7 @@ RUN addgroup \ -s /bin/bash \ -u 1000 \ -G git \ - git && \ - echo "git:*" | chpasswd -e + git RUN mkdir -p /var/lib/gitea /etc/gitea RUN chown git:git /var/lib/gitea /etc/gitea