From eee5180f5a9a5a4d9a7491dd1adc924bababf2db Mon Sep 17 00:00:00 2001 From: litebrick204 Date: Mon, 4 Nov 2024 20:15:40 +0530 Subject: [PATCH] feat: Added OCI labels for dockerfile in images folder --- tekton/images/alpine-git-nonroot/Dockerfile | 3 +++ tekton/images/buildx-gcloud/Dockerfile | 3 +++ tekton/images/coverage/Dockerfile | 3 +++ tekton/images/hub/Dockerfile | 3 +++ tekton/images/kind-e2e/Dockerfile | 3 +++ tekton/images/kind/Dockerfile | 4 ++++ tekton/images/ko-gcloud/Dockerfile | 3 +++ tekton/images/ko/Dockerfile | 3 +++ tekton/images/koparse/Dockerfile | 3 +++ tekton/images/kubectl/Dockerfile | 3 +++ tekton/images/test-runner/Dockerfile | 3 +++ tekton/images/tkn/Dockerfile | 3 +++ 12 files changed, 37 insertions(+) diff --git a/tekton/images/alpine-git-nonroot/Dockerfile b/tekton/images/alpine-git-nonroot/Dockerfile index 438edcc59..ff3962331 100644 --- a/tekton/images/alpine-git-nonroot/Dockerfile +++ b/tekton/images/alpine-git-nonroot/Dockerfile @@ -13,6 +13,9 @@ # limitations under the License. FROM alpine/git:2.45.2@sha256:80ed34dbc31f821e1555812bfef429382b5d6959fc875c0937b44763ee780ebe LABEL maintainer "Tekton Authors " +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Image for Alpine-git Nonroot" +LABEL org.opencontainers.image.licenses=Apache-2.0 RUN adduser -D nonroot -u 1000 USER nonroot diff --git a/tekton/images/buildx-gcloud/Dockerfile b/tekton/images/buildx-gcloud/Dockerfile index f6f8eb16c..070c3e1e0 100644 --- a/tekton/images/buildx-gcloud/Dockerfile +++ b/tekton/images/buildx-gcloud/Dockerfile @@ -13,6 +13,9 @@ # limitations under the License. FROM gcr.io/google.com/cloudsdktool/cloud-sdk:alpine@sha256:1a165df95679dad757f1828601616d39a9d2c58582dc917984f4c1956a9e9655 LABEL maintainer "Tekton Authors " +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Image for Buildx" +LABEL org.opencontainers.image.licenses=Apache-2.0 RUN mkdir -p ~/.docker/cli-plugins \ && curl -fsSL https://github.com/docker/buildx/releases/download/v0.8.1/buildx-v0.8.1.linux-amd64 > ~/.docker/cli-plugins/docker-buildx \ diff --git a/tekton/images/coverage/Dockerfile b/tekton/images/coverage/Dockerfile index 4fa824775..eafe5226d 100644 --- a/tekton/images/coverage/Dockerfile +++ b/tekton/images/coverage/Dockerfile @@ -19,6 +19,9 @@ RUN make -C /go/src/knative.dev/test-infra/tools/coverage FROM golang:1.23@sha256:ad5c126b5cf501a8caef751a243bb717ec204ab1aa56dc41dc11be089fafcb4f LABEL maintainer "Tekton Authors " +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Image for testing Coverage" +LABEL org.opencontainers.image.licenses=Apache-2.0 RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ diff --git a/tekton/images/hub/Dockerfile b/tekton/images/hub/Dockerfile index d01a21b8d..dc740cb6b 100644 --- a/tekton/images/hub/Dockerfile +++ b/tekton/images/hub/Dockerfile @@ -13,6 +13,9 @@ # limitations under the License. FROM alpine:3.20@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d LABEL maintainer "Tekton Authors " +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Image for Hub" +LABEL org.opencontainers.image.licenses=Apache-2.0 RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories RUN apk add --no-cache \ diff --git a/tekton/images/kind-e2e/Dockerfile b/tekton/images/kind-e2e/Dockerfile index a2c71982a..9f0a227ab 100644 --- a/tekton/images/kind-e2e/Dockerfile +++ b/tekton/images/kind-e2e/Dockerfile @@ -16,6 +16,9 @@ FROM golang:1.23-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679 LABEL maintainer "Tekton Authors " +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Image for kind e2e" +LABEL org.opencontainers.image.licenses=Apache-2.0 WORKDIR /kind diff --git a/tekton/images/kind/Dockerfile b/tekton/images/kind/Dockerfile index 92f8a15c0..31eb90d43 100644 --- a/tekton/images/kind/Dockerfile +++ b/tekton/images/kind/Dockerfile @@ -15,6 +15,10 @@ # Runtime image for common dependencies when running kind tests. FROM golang:1.23-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679 +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Image for kind" +LABEL org.opencontainers.image.licenses=Apache-2.0 + WORKDIR /kind diff --git a/tekton/images/ko-gcloud/Dockerfile b/tekton/images/ko-gcloud/Dockerfile index b43400aa1..51a0b0816 100644 --- a/tekton/images/ko-gcloud/Dockerfile +++ b/tekton/images/ko-gcloud/Dockerfile @@ -34,6 +34,9 @@ RUN apk add --no-cache yq FROM google/cloud-sdk:498.0.0-alpine@sha256:1a165df95679dad757f1828601616d39a9d2c58582dc917984f4c1956a9e9655 ARG GO_VERSION LABEL maintainer "Tekton Authors " +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Build Container for Ko" +LABEL org.opencontainers.image.licenses=Apache-2.0 # Install golang RUN curl https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz > go${GO_VERSION}.tar.gz diff --git a/tekton/images/ko/Dockerfile b/tekton/images/ko/Dockerfile index 2162fb8d6..cafc39878 100644 --- a/tekton/images/ko/Dockerfile +++ b/tekton/images/ko/Dockerfile @@ -14,6 +14,9 @@ FROM ghcr.io/ko-build/ko:v0.17.1@sha256:97b809c27679c4d1a6ed4a9acc18562a6b3688033cd3404c6e3722296cbdc802 AS ko FROM golang:1.23-alpine@sha256:9dd2625a1ff2859b8d8b01d8f7822c0f528942fe56cfe7a1e7c38d3b8d72d679 LABEL maintainer "Tekton Authors " +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Image for Ko" +LABEL org.opencontainers.image.licenses=Apache-2.0 RUN apk add --no-cache musl-dev gcc git ENV GO111MODULE on diff --git a/tekton/images/koparse/Dockerfile b/tekton/images/koparse/Dockerfile index 10682994e..04717ced1 100644 --- a/tekton/images/koparse/Dockerfile +++ b/tekton/images/koparse/Dockerfile @@ -13,6 +13,9 @@ # limitations under the License. FROM python:3.13.0-alpine@sha256:c38ead8bcf521573dad837d7ecfdebbc87792202e89953ba8b2b83a9c5a520b6 LABEL maintainer "Tekton Authors " +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Image for koparse" +LABEL org.opencontainers.image.licenses=Apache-2.0 COPY ["koparse/koparse.py", "/usr/local/bin/koparse"] RUN chmod +x /usr/local/bin/koparse diff --git a/tekton/images/kubectl/Dockerfile b/tekton/images/kubectl/Dockerfile index 0db907705..0b451d05f 100644 --- a/tekton/images/kubectl/Dockerfile +++ b/tekton/images/kubectl/Dockerfile @@ -27,6 +27,9 @@ RUN go install sigs.k8s.io/kustomize/kustomize/v5@v5.4.2 FROM alpine:3.20@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d LABEL maintainer "Tekton Authors " +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Image for kubectl" +LABEL org.opencontainers.image.licenses=Apache-2.0 # Kustomize requires git when pulling remote resources RUN apk --update add git less openssh && \ diff --git a/tekton/images/test-runner/Dockerfile b/tekton/images/test-runner/Dockerfile index 0285f565d..6dbe33498 100644 --- a/tekton/images/test-runner/Dockerfile +++ b/tekton/images/test-runner/Dockerfile @@ -26,6 +26,9 @@ RUN cd /go/src/k8s.io/test-infra && \ FROM docker.io/library/ubuntu:24.04@sha256:99c35190e22d294cdace2783ac55effc69d32896daaa265f0bbedbcde4fbe3e5 ARG GO_VERSION LABEL maintainer "Tekton Authors " +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Image for Test runner" +LABEL org.opencontainers.image.licenses=Apache-2.0 ENV TERM=xterm diff --git a/tekton/images/tkn/Dockerfile b/tekton/images/tkn/Dockerfile index df7c5966e..257698759 100644 --- a/tekton/images/tkn/Dockerfile +++ b/tekton/images/tkn/Dockerfile @@ -22,5 +22,8 @@ RUN ARCH=$(uname -m) \ # Copy tkn binary from build container FROM alpine:3.20@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d LABEL maintainer "Tekton Authors " +LABEL org.opencontainers.image.source=https://github.com/tektoncd/plumbing +LABEL org.opencontainers.image.description="Image for tkn" +LABEL org.opencontainers.image.licenses=Apache-2.0 COPY --from=build /usr/local/bin/tkn /usr/local/bin/tkn