| 123456789101112131415161718192021222324252627282930313233343536373839404142 | FROM golang:alpine AS binarybuilder# Install build depsRUN apk --no-cache --no-progress add --virtual build-deps build-base git linux-pam-devWORKDIR /go/src/github.com/gogs/gogsCOPY . .RUN make build TAGS="sqlite cert pam"FROM alpine:latest# Install system utils & Gogs runtime dependenciesADD https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64 /usr/sbin/gosuRUN chmod +x /usr/sbin/gosu \  && echo http://dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories \  && apk --no-cache --no-progress add \    bash \    ca-certificates \    curl \    git \    linux-pam \    openssh \    s6 \    shadow \    socat \    tzdataENV GOGS_CUSTOM /data/gogs# Configure LibC Name ServiceCOPY docker/nsswitch.conf /etc/nsswitch.confWORKDIR /app/gogsCOPY docker ./dockerCOPY templates ./templatesCOPY public ./publicCOPY --from=binarybuilder /go/src/github.com/gogs/gogs/gogs .RUN ./docker/finalize.sh# Configure Docker ContainerVOLUME ["/data"]EXPOSE 22 3000ENTRYPOINT ["/app/gogs/docker/start.sh"]CMD ["/bin/s6-svscan", "/app/gogs/docker/s6/"]
 |