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.

32 lines
672 B

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