1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-25 01:54:26 +00:00

bugfix: make git user configurable

This commit is contained in:
sb 2024-02-19 19:58:05 +00:00
parent 35d5e4aea4
commit 034a5d3449
2 changed files with 14 additions and 4 deletions

View File

@ -9,6 +9,11 @@ ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS "bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS
ARG GIT_UID
ARG GIT_GID
ENV GIT_GID_ENV=${GIT_GID}
ENV GIT_UID_ENV=${GIT_UID}
# Build deps
RUN apk --no-cache add \
build-base \
@ -61,13 +66,13 @@ RUN apk --no-cache add \
&& rm -rf /var/cache/apk/*
RUN addgroup \
-S -g 1000 \
-S -g ${GIT_GID_ENV:-1010} \
git && \
adduser \
-S -H -D \
-h /data/git \
-s /bin/bash \
-u 1000 \
-u ${GIT_UID_ENV:-1010} \
-G git \
git && \
echo "git:*" | chpasswd -e

View File

@ -9,6 +9,11 @@ ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS "bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS
ARG GIT_UID
ARG GIT_GID
ENV GIT_GID_ENV=${GIT_GID}
ENV GIT_UID_ENV=${GIT_UID}
#Build deps
RUN apk --no-cache add \
build-base \
@ -55,13 +60,13 @@ RUN apk --no-cache add \
&& rm -rf /var/cache/apk/*
RUN addgroup \
-S -g 1000 \
-S -g ${GIT_GID_ENV:-1010} \
git && \
adduser \
-S -H -D \
-h /var/lib/gitea/git \
-s /bin/bash \
-u 1000 \
-u ${GIT_UID_ENV:-1010} \
-G git \
git