forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.gitea.dev
67 lines (54 loc) · 1.35 KB
/
Dockerfile.gitea.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
FROM golang:1.19-alpine3.17
ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
ARG TAGS="sqlite sqlite_unlock_notify"
ENV TAGS "bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS
#Build & runtime deps
RUN apk --no-cache add \
build-base \
git \
nodejs \
npm \
bash \
ca-certificates \
curl \
gettext \
git \
linux-pam \
openssh \
s6 \
sqlite \
su-exec \
gnupg
#Setup repo
COPY . /go/src/code.gitea.io/gitea
WORKDIR /go/src/code.gitea.io/gitea
RUN npm install --no-save
RUN mkdir .go-licenses
RUN make build
# Begin env-to-ini build
RUN go build contrib/environment-to-ini/environment-to-ini.go
EXPOSE 22 3000
RUN addgroup \
-S -g 1000 \
git && \
adduser \
-S -H -D \
-h /data/git \
-s /bin/bash \
-u 1000 \
-G git \
git && \
echo "git:*" | chpasswd -e
ENV USER git
ENV GITEA_CUSTOM /data/gitea
VOLUME ["/data"]
ENTRYPOINT ["/usr/bin/entrypoint"]
CMD ["/bin/s6-svscan", "/etc/s6"]
COPY docker/root /
RUN mkdir -p /app/gitea
RUN cp /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
RUN cp /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
RUN chmod 755 /usr/bin/entrypoint /usr/bin/kitspace_dev_entrypoint /app/gitea/gitea /usr/local/bin/gitea /usr/local/bin/environment-to-ini
RUN chmod 755 /etc/s6/gitea/* /etc/s6/openssh/* /etc/s6/.s6-svscan/*