You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
687 B

FROM golang:1.12.6-alpine3.9 as build-container
ENV GITEA_VER="1.10.3"
ENV TAGS="bindata redis"
# The build container
RUN apk add -U build-base git && \
go get -d -u && \
cd $GOPATH/src/ && \
git checkout tags/v$GITEA_VER && \
make clean generate build
# The release container
FROM alpine:3.9
RUN addgroup git && \
adduser -D -S -u 1000 -h /opt -G git git && \
apk add -U --no-cache git openssh-keygen
COPY --from=build-container /go/src/ /opt/custom
COPY --from=build-container /go/src/ /opt/gitea
RUN chown git:git -R /opt
USER git
CMD /opt/gitea web