Skip to content

Conversation

@lautat
Copy link
Contributor

@lautat lautat commented Nov 18, 2025

This adds support for volume.type=image in services, as specified in Compose spec.

Fixes #1202

@lautat lautat force-pushed the feature/mount-images-as-volumes branch from a086cbf to 7cc1a80 Compare November 18, 2025 16:01
Comment on lines 468 to 469
if mount_desc.get("read_only", False):
opts.append("ro")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that ro is invalid with type=image. I guess the same might apply to propagation above.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's worth throwing an exception in that case? I'm merging the PR anyway, as it's still an improvement to the current situation.

@lautat
Copy link
Contributor Author

lautat commented Nov 19, 2025

I also realised that pull probably should pull images that are used in volumes. That's what the initial docker-compose implementation seemed to do by creating a service for the image that is used in a volume.

@p12tic p12tic force-pushed the feature/mount-images-as-volumes branch from 7cc1a80 to 37ed118 Compare November 29, 2025 13:30
@p12tic p12tic merged commit bf7f716 into containers:main Nov 29, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for volume.type=image

2 participants