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.

47 lines
1.4 KiB

  1. FROM chrislusf/gorocksdb as builder
  2. ENV CGO_CFLAGS "-I/tmp/rocksdb/include"
  3. ENV CGO_LDFLAGS "-L/tmp/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy -llz4 -lzstd"
  4. # build SeaweedFS
  5. RUN mkdir -p /go/src/github.com/chrislusf/
  6. RUN git clone https://github.com/chrislusf/seaweedfs /go/src/github.com/chrislusf/seaweedfs
  7. ARG BRANCH=${BRANCH:-master}
  8. RUN cd /go/src/github.com/chrislusf/seaweedfs && git checkout $BRANCH
  9. RUN cd /go/src/github.com/chrislusf/seaweedfs/weed \
  10. && export LDFLAGS="-X github.com/chrislusf/seaweedfs/weed/util.COMMIT=$(git rev-parse --short HEAD)" \
  11. && go install -tags "5BytesOffset rocksdb" -ldflags "-extldflags -static ${LDFLAGS}"
  12. FROM alpine AS final
  13. LABEL author="Chris Lu"
  14. COPY --from=builder /go/bin/weed /usr/bin/
  15. RUN mkdir -p /etc/seaweedfs
  16. COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/filer.toml /etc/seaweedfs/filer.toml
  17. COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/entrypoint.sh /entrypoint.sh
  18. RUN apk add fuse snappy gflags
  19. # volume server gprc port
  20. EXPOSE 18080
  21. # volume server http port
  22. EXPOSE 8080
  23. # filer server gprc port
  24. EXPOSE 18888
  25. # filer server http port
  26. EXPOSE 8888
  27. # master server shared gprc port
  28. EXPOSE 19333
  29. # master server shared http port
  30. EXPOSE 9333
  31. # s3 server http port
  32. EXPOSE 8333
  33. # webdav server http port
  34. EXPOSE 7333
  35. RUN mkdir -p /data/filerldb2
  36. VOLUME /data
  37. RUN chmod +x /entrypoint.sh
  38. ENTRYPOINT ["/entrypoint.sh"]