Dockerfile 1.0 KB

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