Skip to content

Commit

Permalink
Merge pull request #179 from kvanzuijlen/patch-1
Browse files Browse the repository at this point in the history
chore: added oci label to Dockerfile to reference the source
  • Loading branch information
blackpiglet authored Oct 29, 2024
2 parents ad08d1e + d836cf2 commit deb6412
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,15 @@ 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)) \
$(addprefix -t , $(GCR_IMAGE_TAGS)) \
--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) \
Expand Down

0 comments on commit deb6412

Please sign in to comment.