Docker compose recently added support for volume.type=image in docker/compose#12725.
Example from https://github.com/docker/compose/blob/23fc76a5403541eeb8dbdd638f88424bbb799d97/pkg/e2e/fixtures/volumes/compose.yaml#L1-L10
services:
with_image:
image: alpine
command: "ls -al /mnt/image"
volumes:
- type: image
source: nginx:alpine
target: /mnt/image
image:
subpath: usr/share/nginx/html/
Docker compose recently added support for volume.type=image in docker/compose#12725.
Example from https://github.com/docker/compose/blob/23fc76a5403541eeb8dbdd638f88424bbb799d97/pkg/e2e/fixtures/volumes/compose.yaml#L1-L10