Add common label to Dockerfiles (#10803)

This commit is contained in:
Ricardo Katz 2023-12-25 19:38:42 -06:00 committed by GitHub
parent 4b832de985
commit 1a7112e063
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View file

@ -23,6 +23,9 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o kube-webhook-ce
FROM --platform=$BUILDPLATFORM gcr.io/distroless/static:nonroot FROM --platform=$BUILDPLATFORM gcr.io/distroless/static:nonroot
ARG BUILDPLATFORM ARG BUILDPLATFORM
ARG TARGETARCH ARG TARGETARCH
LABEL org.opencontainers.image.source=https://github.com/kubernetes/ingress-nginx
WORKDIR / WORKDIR /
COPY --from=builder /workspace/kube-webhook-certgen /kube-webhook-certgen COPY --from=builder /workspace/kube-webhook-certgen /kube-webhook-certgen
USER 65532:65532 USER 65532:65532

View file

@ -32,6 +32,8 @@ COPY --from=builder /usr/local /usr/local
COPY --from=builder /opt /opt COPY --from=builder /opt /opt
COPY --from=builder /etc/nginx /etc/nginx COPY --from=builder /etc/nginx /etc/nginx
LABEL org.opencontainers.image.source=https://github.com/kubernetes/ingress-nginx
RUN apk update \ RUN apk update \
&& apk upgrade \ && apk upgrade \
&& apk add -U --no-cache \ && apk add -U --no-cache \

View file

@ -125,4 +125,6 @@ RUN pip install "yamllint==$YAML_LINT_VERSION"
# Install Yamale YAML schema validator # Install Yamale YAML schema validator
RUN pip install "yamale==$YAMALE_VERSION" RUN pip install "yamale==$YAMALE_VERSION"
LABEL org.opencontainers.image.source=https://github.com/kubernetes/ingress-nginx
WORKDIR $GOPATH WORKDIR $GOPATH