262 Star 894 Fork 37

无闻 / gogs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 886 Bytes
一键复制 编辑 原始数据 按行查看 历史
FROM golang:alpine3.17 AS binarybuilder
RUN apk --no-cache --no-progress add --virtual \
build-deps \
build-base \
git \
linux-pam-dev
WORKDIR /gogs.io/gogs
COPY . .
RUN ./docker/build/install-task.sh
RUN TAGS="cert pam" task build
FROM alpine:3.17
RUN apk --no-cache --no-progress add \
bash \
ca-certificates \
curl \
git \
linux-pam \
openssh \
s6 \
shadow \
socat \
tzdata \
rsync
ENV GOGS_CUSTOM /data/gogs
# Configure LibC Name Service
COPY docker/nsswitch.conf /etc/nsswitch.conf
WORKDIR /app/gogs
COPY docker ./docker
COPY --from=binarybuilder /gogs.io/gogs/gogs .
RUN ./docker/build/finalize.sh
# Configure Docker Container
VOLUME ["/data", "/backup"]
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/"]
Go
1
https://gitee.com/unknwon/gogs.git
git@gitee.com:unknwon/gogs.git
unknwon
gogs
gogs
main

搜索帮助