diff --git a/.gitea/workflows/release-latest.yaml b/.gitea/workflows/release-latest.yaml index 51b7eaf..2296fbe 100644 --- a/.gitea/workflows/release-latest.yaml +++ b/.gitea/workflows/release-latest.yaml @@ -22,6 +22,7 @@ jobs: - name: Build and push image run: | docker buildx build \ + --build-arg BUILD_DATE="$(date --rfc-3339 seconds)" \ --file Dockerfile \ --platform linux/arm64 \ --provenance false \ @@ -46,6 +47,7 @@ jobs: - name: Build and push image run: | docker buildx build \ + --build-arg BUILD_DATE="$(date --rfc-3339 seconds)" \ --file Dockerfile \ --platform linux/amd64 \ --provenance false \ diff --git a/.gitea/workflows/release-tagged.yaml b/.gitea/workflows/release-tagged.yaml index ba6aae7..c8053ed 100644 --- a/.gitea/workflows/release-tagged.yaml +++ b/.gitea/workflows/release-tagged.yaml @@ -44,6 +44,7 @@ jobs: - name: Build and push image run: | docker buildx build \ + --build-arg BUILD_DATE="$(date --rfc-3339 seconds)" \ --build-arg DC_VERSION=${{ steps.version_extraction.outputs.version_raw }} \ --file Dockerfile \ --platform linux/arm64 \ @@ -84,6 +85,7 @@ jobs: - name: Build and push image run: | docker buildx build \ + --build-arg BUILD_DATE="$(date --rfc-3339 seconds)" \ --build-arg DC_VERSION=${{ steps.version_extraction.outputs.version_raw }} \ --file Dockerfile \ --platform linux/amd64 \ diff --git a/Dockerfile b/Dockerfile index d66bf12..6b6d9a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,8 +19,13 @@ RUN NAME=docker-compose-$(uname | tr [:upper:] [:lower:])-$(uname -m); \ FROM scratch -LABEL org.opencontainers.image.description="Define and run multi-container applications with Docker" \ - io.artifacthub.package.readme-url="https://github.com/docker/compose" +ARG DC_VERSION=v5.1.4 +ARG BUILD_DATE + +LABEL io.artifacthub.package.readme-url="https://github.com/docker/compose" \ + org.opencontainers.image.created="${BUILD_DATE}" \ + org.opencontainers.image.description="Define and run multi-container applications with Docker" \ + org.opencontainers.image.version=${DC_VERSION} COPY --from=download /tmp/docker-compose /usr/bin/docker-compose ENTRYPOINT [ "/usr/bin/docker-compose" ] diff --git a/Makefile b/Makefile index 90f44d0..e885de5 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ DC_IMAGE_FULLY_QUALIFIED=${DC_IMAGE_REGISTRY_NAME}/${DC_IMAGE_NAMESPACE}/${DC_IM PHONY:=container-image/build container-image/build: ${CONTAINER_RUNTIME} build \ + --build-arg BUILD_DATE="$(shell date --rfc-3339 seconds)" \ --file Dockerfile \ --no-cache \ --pull \