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.

37 lines
814 B

  1. # Build go-neb
  2. FROM golang:1.11-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 -u github.com/constabulary/gb/... \
  7. && go get github.com/golang/lint/golint \
  8. && go get github.com/fzipp/gocyclo \
  9. && gb vendor restore \
  10. && gb build -f github.com/matrix-org/go-neb
  11. # Ensures we're lint-free
  12. RUN /tmp/go-neb/hooks/pre-commit
  13. # Run go-neb
  14. FROM alpine:3.7
  15. ENV BIND_ADDRESS=:4050 \
  16. DATABASE_TYPE=sqlite3 \
  17. DATABASE_URL=/data/go-neb.db?_busy_timeout=5000 \
  18. UID=1337 \
  19. GID=1337
  20. COPY --from=builder /tmp/go-neb/bin/go-neb /usr/local/bin/go-neb
  21. RUN apk add --no-cache \
  22. ca-certificates \
  23. su-exec \
  24. s6
  25. VOLUME /data
  26. EXPOSE 4050
  27. COPY docker/root /
  28. ENTRYPOINT ["/bin/s6-svscan", "/etc/s6.d/"]