Files
Gogs/Dockerfile

45 lines
886 B
Docker
Raw Normal View History

FROM golang:alpine3.17 AS binarybuilder
RUN apk --no-cache --no-progress add --virtual \
build-deps \
build-base \
git \
linux-pam-dev
2020-04-07 16:00:12 +08:00
WORKDIR /gogs.io/gogs
COPY . .
RUN ./docker/build/install-task.sh
RUN TAGS="cert pam" task build
2015-08-25 12:41:01 +08:00
FROM alpine:3.17
RUN apk --no-cache --no-progress add \
bash \
ca-certificates \
curl \
git \
linux-pam \
openssh \
s6 \
shadow \
socat \
tzdata \
rsync
2015-08-25 12:41:01 +08:00
ENV GOGS_CUSTOM /data/gogs
2015-08-25 12:41:01 +08:00
# Configure LibC Name Service
COPY docker/nsswitch.conf /etc/nsswitch.conf
WORKDIR /app/gogs
COPY docker ./docker
2020-04-07 16:00:12 +08:00
COPY --from=binarybuilder /gogs.io/gogs/gogs .
RUN ./docker/build/finalize.sh
2015-08-17 03:10:23 -04:00
# Configure Docker Container
VOLUME ["/data", "/backup"]
2015-08-17 03:10:23 -04:00
EXPOSE 22 3000
HEALTHCHECK CMD (curl -o /dev/null -sS http://localhost:3000/healthcheck) || exit 1
ENTRYPOINT ["/app/gogs/docker/start.sh"]
CMD ["/bin/s6-svscan", "/app/gogs/docker/s6/"]