diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b242b79..06a682b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -227,7 +227,10 @@ release: sed -i "s|TEMPLATE_ROOTFS_RELEASE_URL|https://gitlab.archlinux.org/archlinux/archlinux-docker/-/releases/v${BUILD_VERSION}|" output/Dockerfile.${group} sed -i "s|TEMPLATE_ROOTFS_DOWNLOAD|ROOTFS=\"\$(curl -sOJL -w \"%{filename_effective}\" \"${package_url}\")\"|" output/Dockerfile.${group} sed -i "s|TEMPLATE_ROOTFS_HASH|$(cat output/${group}.tar.zst.SHA256)|" output/Dockerfile.${group} - sed -i "s|TEMPLATE_ROOTFS_VERSION|${BUILD_VERSION}|" output/Dockerfile.${group} + sed -i "s|TEMPLATE_TITLE|Arch Linux ${group} Image" output/Dockerfile.${group} + sed -i "s|TEMPLATE_VERSION_ID|${BUILD_VERSION}|" output/Dockerfile.${group} + sed -i "s|TEMPLATE_REVISION|${CI_COMMIT_SHA}|" output/Dockerfile.${group} + sed -i "s|TEMPLATE_CREATED|$(date -Is)|" output/Dockerfile.${group} done - > curl -sSf --request POST -o commit-response.json diff --git a/Dockerfile.template b/Dockerfile.template index 4ea555e..bb248e2 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -8,6 +8,7 @@ # The second stage is for actually configuring the system a little bit. # Some templating is done in order to allow us to easily build different configurations and to # allow us to automate the release process. + FROM alpine:3.18 AS verify COPY TEMPLATE_ROOTFS_FILE / RUN apk add --no-cache curl tar zstd @@ -21,6 +22,18 @@ RUN TEMPLATE_ROOTFS_DOWNLOAD && \ tar -C /rootfs --extract --file "${ROOTFS}" FROM scratch AS root + +LABEL org.opencontainers.image.title="TEMPLATE_TITLE" +LABEL org.opencontainers.image.description="Official containerd image of Arch Linux, a simple, lightweight Linux distribution aimed for flexibility." +LABEL org.opencontainers.image.authors="Santiago Torres-Arias (@SantiagoTorres), Christian Rebischke (@shibumi), Justin Kromlinger (@hashworks)" +LABEL org.opencontainers.image.url="https://gitlab.archlinux.org/archlinux/archlinux-docker/-/blob/master/README.md" +LABEL org.opencontainers.image.documentation="https://wiki.archlinux.org/title/Docker#Arch_Linux" +LABEL org.opencontainers.image.source="https://gitlab.archlinux.org/archlinux/archlinux-docker" +LABEL org.opencontainers.image.licenses="GPL-3.0-or-later" +LABEL org.opencontainers.image.version="TEMPLATE_VERSION_ID" +LABEL org.opencontainers.image.revision="TEMPLATE_REVISION" +LABEL org.opencontainers.image.created="TEMPLATE_CREATED" + COPY --from=verify /rootfs/ / RUN ldconfig && \ diff --git a/Makefile b/Makefile index 4449630..620284e 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,10 @@ define dockerfile -e "s|TEMPLATE_ROOTFS_RELEASE_URL|Local build|" \ -e "s|TEMPLATE_ROOTFS_DOWNLOAD|ROOTFS=\"$(1).tar.zst\"|" \ -e "s|TEMPLATE_ROOTFS_HASH|$$(cat $(OUTPUTDIR)/$(1).tar.zst.SHA256)|" \ + -e "s|TEMPLATE_TITLE|Arch Linux Dev Image|" \ -e "s|TEMPLATE_VERSION_ID|dev|" \ + -e "s|TEMPLATE_REVISION|$$(git rev-parse HEAD)|" \ + -e "s|TEMPLATE_CREATED|$$(date -Is)|" \ Dockerfile.template > $(OUTPUTDIR)/Dockerfile.$(1) endef