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

1 year ago
1 year ago
1 year ago
1234567891011121314151617181920212223242526272829
  1. FROM --platform=$BUILDPLATFORM golang:alpine AS builder
  2. WORKDIR /app
  3. COPY . .
  4. ENV GO111MODULE=on
  5. RUN go mod download
  6. ARG TARGETOS
  7. ARG TARGETARCH
  8. # 使用 GOOS 和 GOARCH 环境变量来构建不同架构的二进制文件
  9. RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-w -s" -o pcm-core-api
  10. FROM --platform=$TARGETPLATFORM alpine:latest
  11. WORKDIR /app
  12. #修改alpine源为上海交通大学
  13. RUN apk add --no-cache ca-certificates && update-ca-certificates && \
  14. apk add --update tzdata && \
  15. rm -rf /var/cache/apk/*
  16. COPY --from=builder /app/pcm-core-api .
  17. COPY --from=builder /app/etc/pcm.yaml .
  18. ENV TZ=Asia/Shanghai
  19. EXPOSE 8999
  20. 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.