Description
What is the problem you're trying to solve
I have a use case that requires configuring propagation options on a bind mount defined in a Compose file, but nerdctl compose
does not currently support bind propagation options.
For example, using this Compose file:
services:
nginx:
container_name: nginx
image: nginx:alpine
volumes:
- type: bind
source: ./mnt
target: /mnt
read_only: true
bind:
propagation: shared
then running sudo nerdctl compose up -d
results in this warning, and the propagation option being ignored:
WARN[0000] Ignoring: volume: Bind: [Propagation]
nerdctl run
already supports this, it's just a matter of supporting the additional propagation option when parsing the compose file to generate the nerdctl run
command.
Describe the solution you'd like
I would like nerdctl compose
to parse propagation options and pass them to the underlying nerdctl run
command. I've already implemented this with a unit test (plus manual testing): dancavallaro@e764188.
Any objection to accepting this contribution if I open a PR? Are there any changes you'd like to see before I do that?
Additional context
No response