Add clarification to --privileged error message

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Upstream-commit: 38e26f0d8d0941a34164c64b04c9646c8c89ac29
Component: engine
This commit is contained in:
TomSweeneyRedHat
2017-06-17 14:39:38 -04:00
parent aaa2288536
commit 6b848bca45

View File

@ -550,7 +550,7 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
// check for various conflicting options with user namespaces
if daemon.configStore.RemappedRoot != "" && hostConfig.UsernsMode.IsPrivate() {
if hostConfig.Privileged {
return warnings, fmt.Errorf("Privileged mode is incompatible with user namespaces")
return warnings, fmt.Errorf("Privileged mode is incompatible with user namespaces. You must run the container in the host namespace when running privileged mode.")
}
if hostConfig.NetworkMode.IsHost() && !hostConfig.UsernsMode.IsHost() {
return warnings, fmt.Errorf("Cannot share the host's network namespace when user namespaces are enabled")