mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
volumes: Implement subpath mount
`VolumeOptions` now has a `Subpath` field which allows to specify a path relative to the volume that should be mounted as a destination. Symlinks are supported, but they cannot escape the base volume directory. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
@@ -164,11 +164,12 @@ func (daemon *Daemon) containerStart(ctx context.Context, daemonCfg *configStore
|
||||
return err
|
||||
}
|
||||
|
||||
m, err := daemon.setupMounts(container)
|
||||
m, cleanup, err := daemon.setupMounts(container)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
mnts = append(mnts, m...)
|
||||
defer cleanup()
|
||||
|
||||
spec, err := daemon.createSpec(ctx, daemonCfg, container, mnts)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user