Dockerfile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. FROM golang:alpine AS builder
  2. MAINTAINER "Yoginth <yoginth@protonmail.com>"
  3. # Install build deps
  4. RUN apk --no-cache --no-progress add --virtual build-deps build-base git
  5. WORKDIR /go/src/gitote/gitote
  6. COPY . .
  7. RUN make build
  8. FROM alpine:latest
  9. # Install system utils & Gitote runtime dependencies
  10. ADD https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64 /usr/sbin/gosu
  11. RUN chmod +x /usr/sbin/gosu \
  12. && echo http://dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories \
  13. && apk --no-cache --no-progress add \
  14. bash \
  15. ca-certificates \
  16. curl \
  17. git \
  18. openssh \
  19. s6 \
  20. shadow \
  21. socat \
  22. tzdata
  23. ENV GITOTE_CUSTOM /data/gitote
  24. # Configure LibC Name Service
  25. COPY docker/nsswitch.conf /etc/nsswitch.conf
  26. WORKDIR /app/gitote
  27. COPY docker ./docker
  28. COPY templates ./templates
  29. COPY public ./public
  30. COPY --from=builder /go/src/gitote/gitote .
  31. RUN ./docker/finalize.sh
  32. # Configure Docker Container
  33. VOLUME ["/data"]
  34. EXPOSE 22 3000
  35. ENTRYPOINT ["/app/gitote/docker/start.sh"]
  36. CMD ["/bin/s6-svscan", "/app/gitote/docker/s6/"]