From a4b7d0c9ddf257c1bc3f1a2da2a8fed455c4cc04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Mon, 17 Aug 2026 15:02:37 +0200 Subject: [PATCH] config/convert: expose Config.Volumes as an annotation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Record the same information as the org.opencontainers.image.volumes annotation, following the existing pattern used for ExposedPorts and StopSignal. Signed-off-by: René Jochum --- oci/config/convert/runtime.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oci/config/convert/runtime.go b/oci/config/convert/runtime.go index 9eb54a99..ba36b4a0 100644 --- a/oci/config/convert/runtime.go +++ b/oci/config/convert/runtime.go @@ -45,6 +45,7 @@ const ( createdAnnotation = "org.opencontainers.image.created" stopSignalAnnotation = "org.opencontainers.image.stopSignal" exposedPortsAnnotation = "org.opencontainers.image.exposedPorts" + volumesAnnotation = "org.opencontainers.image.volumes" ) // ToRuntimeSpec converts the given OCI image configuration to a runtime @@ -185,6 +186,7 @@ func MutateRuntimeSpec(spec *rspec.Spec, rootfs string, image ispec.Image) error setAnnotation(createdAnnotation, ig.Created().Format(igen.ISO8601)) setAnnotation(stopSignalAnnotation, image.Config.StopSignal) setAnnotation(exposedPortsAnnotation, strings.Join(ig.ConfigExposedPorts(), ",")) + setAnnotation(volumesAnnotation, strings.Join(ig.ConfigVolumes(), ",")) // Config.Labels need to be applied after the auto-applied labels. maps.Copy(spec.Annotations, ig.ConfigLabels())