Dockerfile 519 B

123456789101112131415161718192021222324
  1. FROM golang:1.23-bookworm as build-env
  2. WORKDIR /go/src/webpush-fcm-relay
  3. COPY go.mod ./
  4. COPY go.sum ./
  5. RUN go mod download
  6. COPY *.go ./
  7. RUN go build -o webpush-fcm-relay
  8. FROM gcr.io/distroless/base-debian12
  9. COPY --from=build-env /go/src/webpush-fcm-relay/webpush-fcm-relay /
  10. ARG GIT_REPOSITORY_URL
  11. ARG GIT_COMMIT_SHA
  12. ARG VERSION
  13. ENV DD_GIT_REPOSITORY_URL=${GIT_REPOSITORY_URL}
  14. ENV DD_GIT_COMMIT_SHA=${GIT_COMMIT_SHA}
  15. ENV DD_VERSION=${VERSION}
  16. EXPOSE 5985
  17. ENTRYPOINT [ "/webpush-fcm-relay", "-bind=0.0.0.0:5985" ]