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 904 B

6 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
1 year ago
1234567891011121314151617181920212223242526272829303132333435363738
  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 go.mod go.sum ./
  9. RUN go mod download
  10. COPY . .
  11. ARG TARGETOS
  12. ARG TARGETARCH
  13. # 使用 GOOS 和 GOARCH 环境变量来构建不同架构的二进制文件
  14. RUN --mount=type=cache,target=/go/pkg/mod \
  15. --mount=type=cache,target=/root/.cache/go-build \
  16. GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-w -s" -o pcm-core-api
  17. FROM --platform=$TARGETPLATFORM docker-0.unsee.tech/alpine:latest
  18. WORKDIR /app
  19. RUN apk add --no-cache ca-certificates && update-ca-certificates && \
  20. apk add --update tzdata && \
  21. rm -rf /var/cache/apk/*
  22. COPY --from=builder /app/pcm-core-api .
  23. COPY --from=builder /app/etc/pcm.yaml .
  24. ENV TZ=Asia/Shanghai
  25. EXPOSE 8999
  26. ENTRYPOINT ./pcm-core-api --f pcm.yaml

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.