Skip to content

Commit 2d43b39

Browse files
author
Frantisek Kluknavsky
committed
BACKPORT: Add clarification to --privileged error message
Signed-off-by: Frantisek Kluknavsky <fkluknav@redhat.com>
1 parent f9c159a commit 2d43b39

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)