diff --git a/Dockerfile b/Dockerfile index 9bea623..ddfd1c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,3 +35,20 @@ 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"] + +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://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} \ + 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) \