浏览代码

Merge pull request #33722 from TomSweeneyRedHat/tsweeney/privmessage

Add clarification to --privileged error message
Yong Tang 8 年之前
父节点
当前提交
7ccd8bda77
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      daemon/daemon_unix.go

+ 1 - 1
daemon/daemon_unix.go

@@ -547,7 +547,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")