File tree Expand file tree Collapse file tree 2 files changed +67
-1
lines changed Expand file tree Collapse file tree 2 files changed +67
-1
lines changed Original file line number Diff line number Diff line change 11# Build stage
2- FROM golang:1.18 -alpine3.15 AS build-env
2+ FROM golang:1.17 -alpine3.15 AS build-env
33
44ARG GOPROXY
55ENV GOPROXY ${GOPROXY:-direct}
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