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.

43 lines
1.3 KiB

3 years ago
3 years ago
  1. FROM gcc:11 as builder
  2. RUN mkdir -p /go/src/github.com/chrislusf/
  3. RUN git clone https://github.com/chrislusf/seaweedfs /go/src/github.com/chrislusf/seaweedfs
  4. ARG BRANCH=${BRANCH:-master}
  5. RUN cd /go/src/github.com/chrislusf/seaweedfs && git checkout $BRANCH
  6. RUN cd /go/src/github.com/chrislusf/seaweedfs/weed \
  7. && apt-get update \
  8. && apt-get install -y golang-src \
  9. && export LDFLAGS="-X github.com/chrislusf/seaweedfs/weed/util.COMMIT=$(git rev-parse --short HEAD)" \
  10. && CGO_ENABLED=0 go install -ldflags "-extldflags -static ${LDFLAGS}" -compiler=gccgo -tags gccgo,noasm
  11. FROM alpine AS final
  12. LABEL author="Chris Lu"
  13. COPY --from=builder /go/bin/weed /usr/bin/
  14. RUN mkdir -p /etc/seaweedfs
  15. COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/filer.toml /etc/seaweedfs/filer.toml
  16. COPY --from=builder /go/src/github.com/chrislusf/seaweedfs/docker/entrypoint.sh /entrypoint.sh
  17. RUN apk add fuse # for weed mount
  18. # volume server gprc port
  19. EXPOSE 18080
  20. # volume server http port
  21. EXPOSE 8080
  22. # filer server gprc port
  23. EXPOSE 18888
  24. # filer server http port
  25. EXPOSE 8888
  26. # master server shared gprc port
  27. EXPOSE 19333
  28. # master server shared http port
  29. EXPOSE 9333
  30. # s3 server http port
  31. EXPOSE 8333
  32. # webdav server http port
  33. EXPOSE 7333
  34. RUN mkdir -p /data/filerldb2
  35. VOLUME /data
  36. WORKDIR /data
  37. RUN chmod +x /entrypoint.sh
  38. ENTRYPOINT ["/entrypoint.sh"]