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.

39 lines
1.2 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. ARG BRANCH=${BRANCH:-master}
  6. RUN cd /go/src/github.com/chrislusf/seaweedfs && git checkout $BRANCH
  7. RUN cd /go/src/github.com/chrislusf/seaweedfs/weed \
  8. && export LDFLAGS="-X github.com/chrislusf/seaweedfs/weed/util.COMMIT=$(git rev-parse --short HEAD)" \
  9. && go install -ldflags "${LDFLAGS}"
  10. FROM alpine AS final
  11. LABEL author="Chris Lu"
  12. COPY --from=builder /root/go/bin/weed /usr/bin/
  13. RUN mkdir -p /etc/seaweedfs
  14. COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/filer.toml /etc/seaweedfs/filer.toml
  15. COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/entrypoint.sh /entrypoint.sh
  16. # volume server gprc port
  17. EXPOSE 18080
  18. # volume server http port
  19. EXPOSE 8080
  20. # filer server gprc port
  21. EXPOSE 18888
  22. # filer server http port
  23. EXPOSE 8888
  24. # master server shared gprc port
  25. EXPOSE 19333
  26. # master server shared http port
  27. EXPOSE 9333
  28. # s3 server http port
  29. EXPOSE 8333
  30. RUN mkdir -p /data/filerldb2
  31. VOLUME /data
  32. RUN chmod +x /entrypoint.sh
  33. ENTRYPOINT ["/entrypoint.sh"]