From d5761262862288764bae91b7b8e56dcc8f009238 Mon Sep 17 00:00:00 2001 From: Martin Michaelis Date: Thu, 29 Apr 2021 19:48:52 +0200 Subject: [PATCH] Remove random password in Dockerfiles (#15362) * Remove random password of git user in dockerfile * Disable git user account in rootless dockerfile --- Dockerfile | 2 +- Dockerfile.rootless | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e57b93d1a..3445544a9 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 e91720dd5..a379babc2 100644 --- a/Dockerfile.rootless +++ b/Dockerfile.rootless @@ -46,8 +46,7 @@ RUN addgroup \ -s /bin/bash \ -u 1000 \ -G git \ - git && \ - echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd + git RUN mkdir -p /var/lib/gitea /etc/gitea RUN chown git:git /var/lib/gitea /etc/gitea