mirror of https://github.com/docker/cli.git
plugins: container-rootfs-relative paths
Legacy plugins expect host-relative paths (such as for Volume.Mount). However, a containerized plugin cannot respond with a host-relative path. Therefore, this commit modifies new volume plugins' paths in Mount and List to prepend the container's rootfs path. This introduces a new PropagatedMount field in the Plugin Config. When it is set for volume plugins, RootfsPropagation is set to rshared and the path specified by PropagatedMount is bind-mounted with rshared prior to launching the container. This is so that the daemon code can access the paths returned by the plugin from the host mount namespace. Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
parent
1ca2bb4e0b
commit
5a84f77819
|
@ -111,6 +111,10 @@ Config provides the base accessible fields for working with V0 plugin format
|
||||||
|
|
||||||
options of the mount.
|
options of the mount.
|
||||||
|
|
||||||
|
- **`propagatedMount`** *string*
|
||||||
|
|
||||||
|
path to be mounted as rshared, so that mounts under that path are visible to docker. This is useful for volume plugins.
|
||||||
|
|
||||||
- **`env`** *PluginEnv array*
|
- **`env`** *PluginEnv array*
|
||||||
|
|
||||||
env of the plugin, struct consisting of the following fields
|
env of the plugin, struct consisting of the following fields
|
||||||
|
|
|
@ -22,6 +22,10 @@ beyond the lifetime of a single Engine host. See the
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### 1.13.0
|
||||||
|
|
||||||
|
- If used as part of the v2 plugin architecture, mountpoints that are part of paths returned by plugin have to be mounted under the directory specified by PropagatedMount in the plugin configuration [#26398](https://github.com/docker/docker/pull/26398)
|
||||||
|
|
||||||
### 1.12.0
|
### 1.12.0
|
||||||
|
|
||||||
- Add `Status` field to `VolumeDriver.Get` response ([#21006](https://github.com/docker/docker/pull/21006#))
|
- Add `Status` field to `VolumeDriver.Get` response ([#21006](https://github.com/docker/docker/pull/21006#))
|
||||||
|
|
Loading…
Reference in New Issue