-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile-dev
55 lines (45 loc) · 965 Bytes
/
Dockerfile-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
#Build stage
FROM golang:1.18-alpine3.16
ARG GOPROXY
ENV GOPROXY ${GOPROXY:-direct}
ARG GITEA_VERSION
ARG TAGS="sqlite sqlite_unlock_notify sqlite_json"
ENV TAGS "bindata timetzdata $TAGS"
ARG CGO_EXTRA_CFLAGS
#Setup repo
COPY . ${GOPATH}/src/code.gitea.io/gitea
WORKDIR ${GOPATH}/src/code.gitea.io/gitea
EXPOSE 22 3000 80
RUN apk --no-cache add \
bash \
ca-certificates \
curl \
gettext \
linux-pam \
openssh \
s6 \
sqlite \
su-exec \
gnupg \
make \
build-base \
git \
nodejs \
npm \
build-base
RUN apk add git --repository=http://dl-cdn.alpinelinux.org/alpine/v3.16/main
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"]
CMD sh -c 'ln -s /go/src/code.gitea.io /app'; tail -f /data/gitea/log/gitea.log