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
1.1 KiB

4 years ago
4 years ago
  1. FROM frolvlad/alpine-glibc as builder
  2. RUN apk add git go g++
  3. RUN mkdir -p /go/src/github.com/chrislusf/
  4. RUN git clone https://github.com/chrislusf/seaweedfs /go/src/github.com/chrislusf/seaweedfs
  5. RUN cd /go/src/github.com/chrislusf/seaweedfs/weed \
  6. && export LDFLAGS="-X github.com/chrislusf/seaweedfs/weed/util.COMMIT=$(git rev-parse --short HEAD)" \
  7. && go install -ldflags "${LDFLAGS}"
  8. FROM alpine AS final
  9. LABEL author="Chris Lu"
  10. COPY --from=builder /root/go/bin/weed /usr/bin/
  11. RUN mkdir -p /etc/seaweedfs
  12. COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/filer.toml /etc/seaweedfs/filer.toml
  13. COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/entrypoint.sh /entrypoint.sh
  14. # volume server gprc port
  15. EXPOSE 18080
  16. # volume server http port
  17. EXPOSE 8080
  18. # filer server gprc port
  19. EXPOSE 18888
  20. # filer server http port
  21. EXPOSE 8888
  22. # master server shared gprc port
  23. EXPOSE 19333
  24. # master server shared http port
  25. EXPOSE 9333
  26. # s3 server http port
  27. EXPOSE 8333
  28. RUN mkdir -p /data/filerldb2
  29. VOLUME /data
  30. RUN chmod +x /entrypoint.sh
  31. ENTRYPOINT ["/entrypoint.sh"]