Dockerfile.go_build 963 B

1234567891011121314151617181920212223242526272829303132333435
  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 && go install
  6. FROM alpine AS final
  7. LABEL author="Chris Lu"
  8. COPY --from=builder /root/go/bin/weed /usr/bin/
  9. RUN mkdir -p /etc/seaweedfs
  10. COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/filer.toml /etc/seaweedfs/filer.toml
  11. COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/entrypoint.sh /entrypoint.sh
  12. # volume server gprc port
  13. EXPOSE 18080
  14. # volume server http port
  15. EXPOSE 8080
  16. # filer server gprc port
  17. EXPOSE 18888
  18. # filer server http port
  19. EXPOSE 8888
  20. # master server shared gprc port
  21. EXPOSE 19333
  22. # master server shared http port
  23. EXPOSE 9333
  24. # s3 server http port
  25. EXPOSE 8333
  26. RUN mkdir -p /data/filerldb2
  27. VOLUME /data
  28. RUN chmod +x /entrypoint.sh
  29. ENTRYPOINT ["/entrypoint.sh"]