From c280d62fe506df2f90fa4343259e08a979124ddd Mon Sep 17 00:00:00 2001 From: Nigel Armstrong Date: Wed, 17 Aug 2022 22:08:01 -0700 Subject: [PATCH] Label correct container Previous PR added label to the build container, not the final container. --- Dockerfile | 4 ++-- Dockerfile.amd64 | 4 ++-- Dockerfile.arm64 | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8ca108e6..870bbbeb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,6 @@ ENV GO111MODULE=on \ TARGET_GOOS=${TARGET_GOOS} \ TARGET_GOARCH=${TARGET_GOARCH} -LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared" - WORKDIR /go/src/github.com/cloudflare/cloudflared/ # copy our sources into the builder image @@ -20,6 +18,8 @@ RUN make cloudflared # use a distroless base image with glibc FROM gcr.io/distroless/base-debian11:nonroot +LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared" + # copy our compiled binary COPY --from=builder --chown=nonroot /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/ diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index cadfebfc..b5eefc21 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -3,8 +3,6 @@ FROM golang:1.19 as builder ENV GO111MODULE=on \ CGO_ENABLED=0 -LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared" - WORKDIR /go/src/github.com/cloudflare/cloudflared/ # copy our sources into the builder image @@ -16,6 +14,8 @@ RUN GOOS=linux GOARCH=amd64 make cloudflared # use a distroless base image with glibc FROM gcr.io/distroless/base-debian11:nonroot +LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared" + # copy our compiled binary COPY --from=builder --chown=nonroot /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/ diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 3ca14ce8..7995b6c3 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -3,8 +3,6 @@ FROM golang:1.19 as builder ENV GO111MODULE=on \ CGO_ENABLED=0 -LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared" - WORKDIR /go/src/github.com/cloudflare/cloudflared/ # copy our sources into the builder image @@ -16,6 +14,8 @@ RUN GOOS=linux GOARCH=arm64 make cloudflared # use a distroless base image with glibc FROM gcr.io/distroless/base-debian11:nonroot-arm64 +LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared" + # copy our compiled binary COPY --from=builder --chown=nonroot /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/