-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile.amd64
38 lines (30 loc) · 1.11 KB
/
Dockerfile.amd64
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
FROM webhippie/golang:1.23-amd64 as build
ENV GITEA_PATH code.gitea.io/gitea
ENV GITEA_REPO https://github.com/go-gitea/gitea.git
ENV GITEA_BRANCH v1.11.6
RUN apk update && \
apk upgrade && \
apk add nodejs npm && \
git clone -b ${GITEA_BRANCH} ${GITEA_REPO} /srv/app/src/${GITEA_PATH} && \
cd /srv/app/src/${GITEA_PATH} && \
TAGS="bindata sqlite" make build install
FROM webhippie/alpine:latest-amd64
LABEL maintainer="Thomas Boerger <[email protected]>" \
org.label-schema.name="Gitea" \
org.label-schema.version="1.11" \
org.label-schema.vendor="Thomas Boerger" \
org.label-schema.schema-version="1.0"
EXPOSE 3000 22
VOLUME ["/var/lib/gitea", "/var/log/gitea", "/usr/share/gitea"]
WORKDIR /var/lib/gitea
ENTRYPOINT ["/usr/bin/entrypoint"]
CMD ["/bin/s6-svscan", "/etc/s6"]
RUN apk update && \
apk upgrade && \
apk add git git-lfs asciidoc openssh-keygen && \
mkdir -p /var/lib/gitea && \
groupadd -g 1000 git && \
useradd -u 1000 -d /var/lib/gitea -g git -s /bin/bash -M -p '*' git && \
rm -rf /var/cache/apk/*
COPY --from=build /srv/app/bin/gitea /usr/bin/gitea
COPY ./overlay ./overlay-amd64 /