File tree Expand file tree Collapse file tree 2 files changed +86
-20
lines changed Expand file tree Collapse file tree 2 files changed +86
-20
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ WORKDIR ${GOPATH}/src/code.gitea.io/gitea
1818
1919# Checkout version if set
2020RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}" ; fi \
21- && make clean-all build
21+ && make clean-all build
2222
2323# Begin env-to-ini build
2424RUN go build contrib/environment-to-ini/environment-to-ini.go
2929EXPOSE 22 3000
3030
3131RUN apk --no-cache add \
32- bash \
33- ca-certificates \
34- curl \
35- gettext \
36- git \
37- linux-pam \
38- openssh \
39- s6 \
40- sqlite \
41- su-exec \
42- gnupg
32+ bash \
33+ ca-certificates \
34+ curl \
35+ gettext \
36+ git \
37+ linux-pam \
38+ openssh \
39+ s6 \
40+ sqlite \
41+ su-exec \
42+ gnupg
4343
4444RUN addgroup \
45- -S -g 1000 \
46- git && \
45+ -S -g 1000 \
46+ git && \
4747 adduser \
48- -S -H -D \
49- -h /data/git \
50- -s /bin/bash \
51- -u 1000 \
52- -G git \
53- git && \
48+ -S -H -D \
49+ -h /data/git \
50+ -s /bin/bash \
51+ -u 1000 \
52+ -G git \
53+ git && \
5454 echo "git:*" | chpasswd -e
5555
5656ENV USER git
Original file line number Diff line number Diff line change 1+ FROM golang:1.17-alpine3.15
2+
3+ ARG GOPROXY
4+ ENV GOPROXY ${GOPROXY:-direct}
5+
6+ ARG TAGS="sqlite sqlite_unlock_notify"
7+ ENV TAGS "bindata timetzdata $TAGS"
8+ ARG CGO_EXTRA_CFLAGS
9+
10+ #Build & runtime deps
11+ RUN apk --no-cache add \
12+ build-base \
13+ git \
14+ nodejs \
15+ npm \
16+ bash \
17+ ca-certificates \
18+ curl \
19+ gettext \
20+ git \
21+ linux-pam \
22+ openssh \
23+ s6 \
24+ sqlite \
25+ su-exec \
26+ gnupg
27+
28+
29+ #Setup repo
30+ COPY . /go/src/code.gitea.io/gitea
31+ WORKDIR /go/src/code.gitea.io/gitea
32+
33+ RUN npm install --no-save
34+ RUN make build
35+
36+ # Begin env-to-ini build
37+ RUN go build contrib/environment-to-ini/environment-to-ini.go
38+
39+ EXPOSE 22 3000
40+
41+ RUN addgroup \
42+ -S -g 1000 \
43+ git && \
44+ adduser \
45+ -S -H -D \
46+ -h /data/git \
47+ -s /bin/bash \
48+ -u 1000 \
49+ -G git \
50+ git && \
51+ echo "git:*" | chpasswd -e
52+
53+ ENV USER git
54+ ENV GITEA_CUSTOM /data/gitea
55+
56+ VOLUME ["/data"]
57+
58+ ENTRYPOINT ["/usr/bin/entrypoint"]
59+ CMD ["/bin/s6-svscan", "/etc/s6"]
60+
61+ COPY docker/root /
62+ RUN mkdir -p /app/gitea
63+ RUN cp /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
64+ RUN cp /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
65+ RUN chmod 755 /usr/bin/entrypoint /app/gitea/gitea /usr/local/bin/gitea /usr/local/bin/environment-to-ini
66+ RUN chmod 755 /etc/s6/gitea/* /etc/s6/openssh/* /etc/s6/.s6-svscan/*
You can’t perform that action at this time.
0 commit comments