Dockerfile 673 B

123456789101112131415161718192021222324
  1. FROM alpine:3.5
  2. # Install system utils & Gogs runtime dependencies
  3. ADD https://github.com/tianon/gosu/releases/download/1.9/gosu-amd64 /usr/sbin/gosu
  4. RUN chmod +x /usr/sbin/gosu \
  5. && apk --no-cache --no-progress add ca-certificates bash git linux-pam s6 curl openssh socat tzdata
  6. ENV GOGS_CUSTOM /data/gogs
  7. COPY . /app/gogs/build
  8. WORKDIR /app/gogs/build
  9. RUN ./docker/build-go.sh \
  10. && ./docker/build.sh \
  11. && ./docker/finalize.sh
  12. # Configure LibC Name Service
  13. COPY docker/nsswitch.conf /etc/nsswitch.conf
  14. # Configure Docker Container
  15. VOLUME ["/data"]
  16. EXPOSE 22 3000
  17. ENTRYPOINT ["/app/gogs/docker/start.sh"]
  18. CMD ["/bin/s6-svscan", "/app/gogs/docker/s6/"]