@@ -38,6 +38,17 @@ DOCKER_LABELS+= --label "org.opencontainers.image.licenses=$(LICENSE)"
3838DOCKER_LABELS+ = --label "org.opencontainers.image.documentation=$(DOCUMENTATION_URL ) "
3939DOCKER_LABELS+ = --label "org.opencontainers.image.vendor=$(VENDOR_NAME ) "
4040
41+ DOCKER_ANNOTATIONS: = --annotation "org.opencontainers.image.title=$(CMDNAME ) "
42+ DOCKER_ANNOTATIONS+ = --annotation "org.opencontainers.image.description=$(DESCRIPTION ) "
43+ DOCKER_ANNOTATIONS+ = --annotation "org.opencontainers.image.url=$(SOURCE_URL ) "
44+ DOCKER_ANNOTATIONS+ = --annotation "org.opencontainers.image.source=$(SOURCE_URL ) "
45+ DOCKER_ANNOTATIONS+ = --annotation "org.opencontainers.image.version=$(REPO_TAG ) "
46+ DOCKER_ANNOTATIONS+ = --annotation "org.opencontainers.image.created=$(CONTAINER_BUILD_DATE ) "
47+ DOCKER_ANNOTATIONS+ = --annotation "org.opencontainers.image.revision=$(shell  git rev-parse HEAD 2>/dev/null) "
48+ DOCKER_ANNOTATIONS+ = --annotation "org.opencontainers.image.licenses=$(LICENSE ) "
49+ DOCKER_ANNOTATIONS+ = --annotation "org.opencontainers.image.documentation=$(DOCUMENTATION_URL ) "
50+ DOCKER_ANNOTATIONS+ = --annotation "org.opencontainers.image.vendor=$(VENDOR_NAME ) "
51+ 
4152.PHONY : docker/% /multiarch
4253docker/% /multiarch :
4354	$(eval  ACTION:= $(word  1,$(subst  /, , $* ) ) ) 
@@ -49,6 +60,7 @@ docker/%/multiarch:
4960		--provenance=false \ 
5061		$(IMAGE_TAGS )  \ 
5162		$(DOCKER_LABELS )  \ 
63+ 		$(DOCKER_ANNOTATIONS )  \ 
5264		--file ./Dockerfile $(OUTPUT_DIR )  $(ADDITIONAL_PARAMETER ) 
5365
5466.PHONY : docker/build/% 
@@ -59,8 +71,9 @@ docker/build/%:
5971	$(info  Building image for $(OS )  $(ARCH )  $(ARM ) ) 
6072	$(DOCKER_CMD )  build --platform $*  \ 
6173		--build-arg CMD_NAME=$(CMDNAME )  \ 
62- 		$(DOCKER_LABELS )  \ 
6374		$(IMAGE_TAGS )  \ 
75+ 		$(DOCKER_LABELS )  \ 
76+ 		$(DOCKER_ANNOTATIONS )  \ 
6477		--file ./Dockerfile $(OUTPUT_DIR ) 
6578
6679.PHONY : docker/setup/multiarch
0 commit comments