From a962bf8cdc0d38d6cb61079d4b0e254b77f0f2d5 Mon Sep 17 00:00:00 2001 From: Koen van Zuijlen <8818390+kvanzuijlen@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:44:45 +0200 Subject: [PATCH 1/3] chore: added oci label to reference the source This label could be used by [Renovatebot](https://docs.renovatebot.com/modules/datasource/docker/) for example to automatically pull a changelog into PRs it creates. Signed-off-by: kvanzuijlen <8818390+kvanzuijlen@users.noreply.github.com> --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9bea623..09a5de6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,3 +35,5 @@ COPY --from=build /go/bin/velero-plugin-for-gcp /plugins/ COPY --from=build /go/bin/cp-plugin /bin/cp-plugin USER 65532:65532 ENTRYPOINT ["cp-plugin", "/plugins/velero-plugin-for-gcp", "/target/velero-plugin-for-gcp"] + +LABEL org.opencontainers.image.source="https://github.com/vmware-tanzu/velero-plugin-for-gcp" From 79d13d78f19cb2b20a3becb77022f2cadfdfe0e2 Mon Sep 17 00:00:00 2001 From: kvanzuijlen <8818390+kvanzuijlen@users.noreply.github.com> Date: Fri, 19 Apr 2024 17:47:38 +0200 Subject: [PATCH 2/3] chore: added more oci annotations Signed-off-by: kvanzuijlen <8818390+kvanzuijlen@users.noreply.github.com> --- Dockerfile | 17 ++++++++++++++++- Makefile | 3 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 09a5de6..7823712 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,4 +36,19 @@ COPY --from=build /go/bin/cp-plugin /bin/cp-plugin USER 65532:65532 ENTRYPOINT ["cp-plugin", "/plugins/velero-plugin-for-gcp", "/target/velero-plugin-for-gcp"] -LABEL org.opencontainers.image.source="https://github.com/vmware-tanzu/velero-plugin-for-gcp" +ARG CREATED +ARG VERSION +ARG GIT_SHA + +LABEL \ + org.opencontainers.image.created=${CREATED} \ + org.opencontainers.image.url="https://hub.docker.com/r/velero/velero-plugin-for-gcp" \ + org.opencontainers.image.documentation="https://velero.io" \ + org.opencontainers.image.source="https://github.com/vmware-tanzu/velero-plugin-for-gcp" \ + org.opencontainers.image.version=${VERSION} \ + org.opencontainers.image.revision=${GIT_SHA} \ + org.opencontainers.image.vendor="vmware-tanzu" \ + org.opencontainers.image.licenses="Apache-2.0" \ + org.opencontainers.image.title="velero-plugin-for-gcp" \ + org.opencontainers.image.description="Plugins to support Velero on Google Cloud Platform (GCP)" \ + org.opencontainers.image.base.name="scratch" diff --git a/Makefile b/Makefile index 9770499..04f8439 100644 --- a/Makefile +++ b/Makefile @@ -103,7 +103,7 @@ container: ifneq ($(BUILDX_ENABLED), true) $(error $(BUILDX_ERROR)) endif - @docker buildx build --pull \ + docker buildx build --pull \ --output=type=$(BUILDX_OUTPUT_TYPE) \ --platform $(BUILDX_PLATFORMS) \ $(addprefix -t , $(IMAGE_TAGS)) \ @@ -111,6 +111,7 @@ endif --build-arg=GOPROXY=$(GOPROXY) \ --build-arg=PKG=$(PKG) \ --build-arg=BIN=$(BIN) \ + --build-arg=CREATED="$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')" \ --build-arg=VERSION=$(VERSION) \ --build-arg=GIT_SHA=$(GIT_SHA) \ --build-arg=GIT_TREE_STATE=$(GIT_TREE_STATE) \ From d836cf205f8db6498ecd6f119251d5ac002d6166 Mon Sep 17 00:00:00 2001 From: kvanzuijlen <8818390+kvanzuijlen@users.noreply.github.com> Date: Fri, 19 Apr 2024 21:41:42 +0200 Subject: [PATCH 3/3] chore: updated documentation URL Signed-off-by: kvanzuijlen <8818390+kvanzuijlen@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7823712..ddfd1c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,7 @@ ARG GIT_SHA LABEL \ org.opencontainers.image.created=${CREATED} \ org.opencontainers.image.url="https://hub.docker.com/r/velero/velero-plugin-for-gcp" \ - org.opencontainers.image.documentation="https://velero.io" \ + org.opencontainers.image.documentation="https://github.com/vmware-tanzu/velero-plugin-for-gcp" \ org.opencontainers.image.source="https://github.com/vmware-tanzu/velero-plugin-for-gcp" \ org.opencontainers.image.version=${VERSION} \ org.opencontainers.image.revision=${GIT_SHA} \