Skip to content

Commit bbb107e

Browse files
authored
move setting password from hardcoded to variable
Moves code for setting password from hardcoded Dockerfile to entrypoint variable
1 parent 063c23e commit bbb107e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docker/root/usr/bin/entrypoint

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ if [ -n "${USER_UID}" ] && [ "${USER_UID}" != "`id -u ${USER}`" ]; then
3030
sed -i -e "s/^${USER}:\([^:]*\):[0-9]*:\([0-9]*\)/${USER}:\1:${USER_UID}:\2/" /etc/passwd
3131
fi
3232

33+
# change password for git user
34+
if [ -z "${PASS}" ]; then
35+
echo "git:${PASS}" | chpasswd -e
36+
fi
37+
3338
for FOLDER in /data/gitea/conf /data/gitea/log /data/git /data/ssh; do
3439
mkdir -p ${FOLDER}
3540
done

0 commit comments

Comments
 (0)