]> source.dussan.org Git - gitea.git/commitdiff
Remove random password in Dockerfiles (#15362)
authorMartin Michaelis <code@mgjm.de>
Thu, 29 Apr 2021 17:48:52 +0000 (19:48 +0200)
committerGitHub <noreply@github.com>
Thu, 29 Apr 2021 17:48:52 +0000 (19:48 +0200)
* Remove random password of git user in dockerfile

* Disable git user account in rootless dockerfile

Dockerfile
Dockerfile.rootless

index e57b93d1ae722d4a7976af1e8dce13a3a4a25872..3445544a94c871c407312d7a3d6858a41fbc6ff4 100644 (file)
@@ -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
index e91720dd5f33dbc03ff878c2144c6e926319d53d..a379babc2d9a7dab45ca74eb295a551e9c70e191 100644 (file)
@@ -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