You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
725 B

  1. # Build go-neb
  2. FROM golang:1.14-alpine as builder
  3. RUN apk add --no-cache -t build-deps git gcc musl-dev go
  4. COPY . /tmp/go-neb
  5. WORKDIR /tmp/go-neb
  6. RUN go get golang.org/x/lint/golint \
  7. && go get github.com/fzipp/gocyclo \
  8. && go build github.com/matrix-org/go-neb
  9. # Ensures we're lint-free
  10. RUN /tmp/go-neb/hooks/pre-commit
  11. # Run go-neb
  12. FROM alpine:3.7
  13. ENV BIND_ADDRESS=:4050 \
  14. DATABASE_TYPE=sqlite3 \
  15. DATABASE_URL=/data/go-neb.db?_busy_timeout=5000 \
  16. UID=1337 \
  17. GID=1337
  18. COPY --from=builder /tmp/go-neb/go-neb /usr/local/bin/go-neb
  19. RUN apk add --no-cache \
  20. ca-certificates \
  21. su-exec \
  22. s6
  23. VOLUME /data
  24. EXPOSE 4050
  25. COPY docker/root /
  26. ENTRYPOINT ["/bin/s6-svscan", "/etc/s6.d/"]