mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Add experimental feature warning for image mount
Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/containerd/log"
|
||||
containertypes "github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/api/types/mount"
|
||||
networktypes "github.com/docker/docker/api/types/network"
|
||||
"github.com/docker/docker/container"
|
||||
"github.com/docker/docker/daemon/config"
|
||||
@@ -275,6 +276,11 @@ func validateHostConfig(hostConfig *containertypes.HostConfig) (warnings []strin
|
||||
parser := volumemounts.NewParser()
|
||||
for _, c := range hostConfig.Mounts {
|
||||
cfg := c
|
||||
|
||||
if cfg.Type == mount.TypeImage {
|
||||
warnings = append(warnings, "Image mount is an experimental feature")
|
||||
}
|
||||
|
||||
if err := parser.ValidateMountConfig(&cfg); err != nil {
|
||||
return warnings, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user