Hello guys!
I’d like to have some folder from the container being shared using NFS with a remote host, so I need to change the default rprivate bind-propagation level of the particular volume to something like rslave to have those other mounts inside the volume to be writable from the container and be in sync with a remote host. Docker reference.
Didn’t find something similar to bind-propagation in the documentation, so could you please help me figure out how can I achieve this with Replicated? Thanks.
Good morning!
Options can be set as part of the volume specification - but unlike what’s shown in the docker documentation, bind-propagation options are set with the value only, not key=value. Multiple options can be specified, but only one of each type - setting both read/write and readonly would be nonsensical, so the yaml linter prevents that.
The Read/Write mode can be rw or ro, Selinux labels can be z or Z, and bind-propagation can be shared, slave, private, rshared, rslave or rprivate.
So,
volumes:
- host_path: /
container_path: /host
options:
- "rw"
- "rslave"
is acceptable, but
volumes:
- host_path: /
container_path: /host
options:
- "shared"
- "rslave"
is not.
Try with
volumes:
- type: bind
bind:
propagation: shared