Give each variant its own image description label
Both published variants inherited Dockerfile.base's description="pi-devbox — base image (variant-independent)", so v1.6.4 and v1.6.4-studio both advertised themselves on Docker Hub as the base image — misleading, and useless for telling the two apart. A LABEL cannot branch on INSTALL_STUDIO, so the text arrives as a build-arg: CI passes a variant-specific string (interpolating RELEASE_TAG, PI_VERSION and, for studio, STUDIO_TAG), and the Dockerfile default keeps a bare local `docker build -f Dockerfile.variant` honest instead of misleading. Also sets org.opencontainers.image.title/description alongside the legacy bare `description` key, so Hub and OCI-aware tooling both see it. ARGs stay in the last-declared block, so the label layer is still the only thing invalidated. Verified: hadolint 2.14.0 (the CI-pinned version) clean on both Dockerfiles; workflow YAML parses; check-workflow-shell.sh passes. Lands on the next release.
This commit is contained in:
@@ -490,6 +490,8 @@ jobs:
|
|||||||
--build-arg "PI_TOOLKIT_REF=${TOOLKIT_REF}" \
|
--build-arg "PI_TOOLKIT_REF=${TOOLKIT_REF}" \
|
||||||
--build-arg "PI_EXTENSIONS_REF=${EXTENSIONS_REF}" \
|
--build-arg "PI_EXTENSIONS_REF=${EXTENSIONS_REF}" \
|
||||||
--build-arg "MEMPALACE_TOOLKIT_REF=${MEMPALACE_TOOLKIT_REF}" \
|
--build-arg "MEMPALACE_TOOLKIT_REF=${MEMPALACE_TOOLKIT_REF}" \
|
||||||
|
--build-arg "IMAGE_TITLE=pi-devbox" \
|
||||||
|
--build-arg "IMAGE_DESCRIPTION=pi-devbox ${RELEASE_TAG} — core variant: pi coding agent CLI ${PI_VERSION}, pi-toolkit, extensions (fork + observational-memory), MemPalace. No browser UI — see the -studio tags for that." \
|
||||||
--build-arg "RELEASE_TAG=${RELEASE_TAG}" \
|
--build-arg "RELEASE_TAG=${RELEASE_TAG}" \
|
||||||
--build-arg "BUILD_DATE=${BUILD_DATE}" \
|
--build-arg "BUILD_DATE=${BUILD_DATE}" \
|
||||||
--build-arg "SOURCE_REVISION=${GITHUB_SHA:-}" \
|
--build-arg "SOURCE_REVISION=${GITHUB_SHA:-}" \
|
||||||
@@ -579,6 +581,8 @@ jobs:
|
|||||||
--build-arg "PI_EXTENSIONS_REF=${EXTENSIONS_REF}" \
|
--build-arg "PI_EXTENSIONS_REF=${EXTENSIONS_REF}" \
|
||||||
--build-arg "MEMPALACE_TOOLKIT_REF=${MEMPALACE_TOOLKIT_REF}" \
|
--build-arg "MEMPALACE_TOOLKIT_REF=${MEMPALACE_TOOLKIT_REF}" \
|
||||||
--build-arg "INSTALL_STUDIO=true" \
|
--build-arg "INSTALL_STUDIO=true" \
|
||||||
|
--build-arg "IMAGE_TITLE=pi-devbox (studio)" \
|
||||||
|
--build-arg "IMAGE_DESCRIPTION=pi-devbox ${RELEASE_TAG} — studio variant: everything in the core variant (pi ${PI_VERSION}, pi-toolkit, fork + observational-memory, MemPalace) plus the pi-studio browser UI ${STUDIO_TAG}." \
|
||||||
--build-arg "PI_STUDIO_REF=${STUDIO_REF}" \
|
--build-arg "PI_STUDIO_REF=${STUDIO_REF}" \
|
||||||
--build-arg "PI_STUDIO_VERSION=${STUDIO_TAG}" \
|
--build-arg "PI_STUDIO_VERSION=${STUDIO_TAG}" \
|
||||||
--build-arg "RELEASE_TAG=${RELEASE_TAG}" \
|
--build-arg "RELEASE_TAG=${RELEASE_TAG}" \
|
||||||
|
|||||||
@@ -219,10 +219,21 @@ ARG SOURCE_REVISION=
|
|||||||
# MEMPALACE_TOOLKIT_REF is consumed in Dockerfile.base; re-declared here
|
# MEMPALACE_TOOLKIT_REF is consumed in Dockerfile.base; re-declared here
|
||||||
# only so its intended ref lands in the label set alongside the others.
|
# only so its intended ref lands in the label set alongside the others.
|
||||||
ARG MEMPALACE_TOOLKIT_REF=main
|
ARG MEMPALACE_TOOLKIT_REF=main
|
||||||
|
# Dockerfile.base sets description="pi-devbox — base image (variant-independent)"
|
||||||
|
# and every variant INHERITS it, so both published images used to advertise
|
||||||
|
# themselves on Docker Hub as the base image. A LABEL cannot branch on
|
||||||
|
# INSTALL_STUDIO, so the description arrives as a build-arg: CI passes the
|
||||||
|
# variant-specific string (see docker-publish.yml), and the default below keeps
|
||||||
|
# a plain `docker build -f Dockerfile.variant` honest rather than misleading.
|
||||||
|
ARG IMAGE_TITLE="pi-devbox"
|
||||||
|
ARG IMAGE_DESCRIPTION="pi-devbox — development container for the pi coding agent"
|
||||||
|
|
||||||
LABEL org.opencontainers.image.version="${RELEASE_TAG}" \
|
LABEL org.opencontainers.image.version="${RELEASE_TAG}" \
|
||||||
org.opencontainers.image.revision="${SOURCE_REVISION}" \
|
org.opencontainers.image.revision="${SOURCE_REVISION}" \
|
||||||
org.opencontainers.image.created="${BUILD_DATE}" \
|
org.opencontainers.image.created="${BUILD_DATE}" \
|
||||||
|
org.opencontainers.image.title="${IMAGE_TITLE}" \
|
||||||
|
org.opencontainers.image.description="${IMAGE_DESCRIPTION}" \
|
||||||
|
description="${IMAGE_DESCRIPTION}" \
|
||||||
se.jordbo.pi-devbox.pi-version="${PI_VERSION}" \
|
se.jordbo.pi-devbox.pi-version="${PI_VERSION}" \
|
||||||
se.jordbo.pi-devbox.pi-toolkit-ref="${PI_TOOLKIT_REF}" \
|
se.jordbo.pi-devbox.pi-toolkit-ref="${PI_TOOLKIT_REF}" \
|
||||||
se.jordbo.pi-devbox.pi-extensions-ref="${PI_EXTENSIONS_REF}" \
|
se.jordbo.pi-devbox.pi-extensions-ref="${PI_EXTENSIONS_REF}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user