sincecutoff.com
← all changes

nerdctl compose supports image volumes

Introduced 2026-09-20 · score 0.96

HOW TO USE IT

When a Compose service needs to mount an image, set its volume `type` to `image` and specify the image reference and mount target. Run `nerdctl compose up` to create and start the project.

services: <SERVICE>: volumes: - type: image source: <IMAGE_REFERENCE> target: <CONTAINER_PATH> # From the Compose project directory: nerdctl compose up

WHY THIS HELPS

Maintain a Compose project that mounts an image volume.

REQUIREMENTS AND LIMITATIONS

  • Version: v2.4.0
  • services.<SERVICE>.volumes[].type (required): Set to `image` for an image volume.
  • services.<SERVICE>.volumes[].source (required): Image reference used as the mount source.
  • services.<SERVICE>.volumes[].target (required): Container path where the image is mounted; the v2.4.0 Compose image-volume docs do not describe this field.
  • services.<SERVICE>.volumes[].image.subpath: Not supported in v2.4.0.
  • Prerequisite: Use nerdctl v2.4.0 or later for the released image-volume support.
  • Prerequisite: nerdctl Compose is documented as requiring nerdctl >= 0.8.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card