From 709df3ded036c5d26e8aede2116d5b0c66ddff81 Mon Sep 17 00:00:00 2001 From: Sankalp Yengaldas Date: Wed, 11 Sep 2024 07:02:04 -0400 Subject: [PATCH 1/3] add org.opencontainers.image url and source labels to dockerfiles Signed-off-by: Sankalp Yengaldas --- Dockerfile | 2 ++ Dockerfile.docs | 2 ++ Dockerfile.windows | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index fa6b77ea52..e71d740e50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -149,6 +149,8 @@ COPY --from=runtime-collect / / FROM ubuntu:24.04 AS test ARG TARGETARCH +LABEL org.opencontainers.image.url="https://hub.docker.com/r/rancher/rke2-runtime" +LABEL org.opencontainers.image.source="https://github.com/rancher/rke2" VOLUME /var/lib/rancher/rke2 VOLUME /var/lib/kubelet VOLUME /var/lib/cni diff --git a/Dockerfile.docs b/Dockerfile.docs index 0bebe7c9fa..40ffc439e2 100644 --- a/Dockerfile.docs +++ b/Dockerfile.docs @@ -1,4 +1,6 @@ FROM squidfunk/mkdocs-material +LABEL org.opencontainers.image.url="https://hub.docker.com/r/rancher/rke2-runtime" +LABEL org.opencontainers.image.source="https://github.com/rancher/rke2" RUN pip install mkdocs-markdownextradata-plugin RUN apk add -U git openssh diff --git a/Dockerfile.windows b/Dockerfile.windows index 4d68e641cd..324a57b0ce 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -105,6 +105,8 @@ RUN mv CalicoWindows/cni/calico-ipam.exe rancher/ RUN mv CalicoWindows/confd confd/ FROM scratch AS windows-runtime +LABEL org.opencontainers.image.url="https://hub.docker.com/r/rancher/rke2-runtime" +LABEL org.opencontainers.image.source="https://github.com/rancher/rke2" COPY --from=containerd /usr/local/bin/*.exe /bin/ COPY --from=windows-runtime-collect ./rancher/* /bin/ COPY --from=windows-runtime-collect ./confd/ /bin/confd From 4c8fdcc50ea14d83456b069bcba7179841643415 Mon Sep 17 00:00:00 2001 From: Sankalp Yengaldas Date: Thu, 10 Oct 2024 05:55:21 -0400 Subject: [PATCH 2/3] undo labels for docs Signed-off-by: Sankalp Yengaldas --- Dockerfile.docs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile.docs b/Dockerfile.docs index 40ffc439e2..0bebe7c9fa 100644 --- a/Dockerfile.docs +++ b/Dockerfile.docs @@ -1,6 +1,4 @@ FROM squidfunk/mkdocs-material -LABEL org.opencontainers.image.url="https://hub.docker.com/r/rancher/rke2-runtime" -LABEL org.opencontainers.image.source="https://github.com/rancher/rke2" RUN pip install mkdocs-markdownextradata-plugin RUN apk add -U git openssh From aebc37c82a6c448036aebe41eb8876c5e7d5885b Mon Sep 17 00:00:00 2001 From: Sankalp Yengaldas Date: Tue, 15 Oct 2024 06:58:23 -0400 Subject: [PATCH 3/3] move labels to runtime target Signed-off-by: Sankalp Yengaldas --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e71d740e50..e96dec70e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -145,12 +145,12 @@ COPY --from=charts \ /charts/ FROM scratch AS runtime +LABEL org.opencontainers.image.url="https://hub.docker.com/r/rancher/rke2-runtime" +LABEL org.opencontainers.image.source="https://github.com/rancher/rke2" COPY --from=runtime-collect / / FROM ubuntu:24.04 AS test ARG TARGETARCH -LABEL org.opencontainers.image.url="https://hub.docker.com/r/rancher/rke2-runtime" -LABEL org.opencontainers.image.source="https://github.com/rancher/rke2" VOLUME /var/lib/rancher/rke2 VOLUME /var/lib/kubelet VOLUME /var/lib/cni