Skip to content

Commit

Permalink
Remove random password in Dockerfiles (#15362)
Browse files Browse the repository at this point in the history
* Remove random password of git user in dockerfile

* Disable git user account in rootless dockerfile
  • Loading branch information
mgjm authored Apr 29, 2021
1 parent f67e360 commit d576126
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile.rootless
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d576126

Please sign in to comment.