Skip to content

Commit f2f719e

Browse files
authored
Merge pull request #276 from fkluknav/docker-1.12.6
BACKPORT: Add clarification to --privileged error message
2 parents f9c159a + 2d43b39 commit f2f719e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

daemon/daemon_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
499499
// check for various conflicting options with user namespaces
500500
if daemon.configStore.RemappedRoot != "" && hostConfig.UsernsMode.IsPrivate() {
501501
if hostConfig.Privileged {
502-
return warnings, fmt.Errorf("Privileged mode is incompatible with user namespaces")
502+
return warnings, fmt.Errorf("Privileged mode is incompatible with user namespaces. You must run the container in the host namespace (--userns=host) when running privileged mode.")
503503
}
504504
if hostConfig.NetworkMode.IsHost() && !hostConfig.UsernsMode.IsHost() {
505505
return warnings, fmt.Errorf("Cannot share the host's network namespace when user namespaces are enabled")

0 commit comments

Comments
 (0)