You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1.3 kB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. FROM docker-0.unsee.tech/golang:alpine AS builder
  2. WORKDIR /app
  3. ENV GOPROXY=https://goproxy.cn \
  4. GO111MODULE=on \
  5. CGO_ENABLED=0 \
  6. GOCACHE=/root/.cache/go-build \
  7. GOMODCACHE=/go/pkg/mod
  8. COPY ../common /app/common
  9. COPY . /app/storage
  10. # 编译
  11. WORKDIR /app/storage
  12. RUN --mount=type=cache,target=/go/pkg/mod \
  13. --mount=type=cache,target=/root/.cache/go-build \
  14. mage linux all
  15. # 基础运行环境
  16. FROM docker-0.unsee.tech/alpine:latest AS base
  17. WORKDIR /app
  18. RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
  19. RUN apk add --no-cache tzdata
  20. ENV TZ=Asia/Shanghai
  21. RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
  22. # hub
  23. FROM base AS hubimage
  24. COPY --from=builder /app/storage/build/hub .
  25. RUN chmod +x hub/hub
  26. ENTRYPOINT ["./hub/hub"]
  27. # coordinator
  28. FROM base AS coorimage
  29. COPY --from=builder /app/storage/build/coordinator .
  30. RUN chmod +x coordinator/coordinator
  31. ENTRYPOINT ["./coordinator/coordinator"]
  32. # scanner
  33. FROM base AS scannerimage
  34. COPY --from=builder /app/storage/build/scanner .
  35. RUN chmod +x scanner/scanner
  36. ENTRYPOINT ["./scanner/scanner"]
  37. # client
  38. FROM base AS clientimage
  39. COPY --from=builder /app/storage/build/client .
  40. RUN chmod +x client/client
  41. ENTRYPOINT ["./client/client","serve","http"]

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。