|
@@ -557,13 +557,13 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
|
|
// check for various conflicting options with user namespaces
|
|
// check for various conflicting options with user namespaces
|
|
if daemon.configStore.RemappedRoot != "" && hostConfig.UsernsMode.IsPrivate() {
|
|
if daemon.configStore.RemappedRoot != "" && hostConfig.UsernsMode.IsPrivate() {
|
|
if hostConfig.Privileged {
|
|
if hostConfig.Privileged {
|
|
- return warnings, fmt.Errorf("Privileged mode is incompatible with user namespaces. You must run the container in the host namespace when running privileged mode.")
|
|
|
|
|
|
+ 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() {
|
|
if hostConfig.NetworkMode.IsHost() && !hostConfig.UsernsMode.IsHost() {
|
|
- return warnings, fmt.Errorf("Cannot share the host's network namespace when user namespaces are enabled")
|
|
|
|
|
|
+ return warnings, fmt.Errorf("cannot share the host's network namespace when user namespaces are enabled")
|
|
}
|
|
}
|
|
if hostConfig.PidMode.IsHost() && !hostConfig.UsernsMode.IsHost() {
|
|
if hostConfig.PidMode.IsHost() && !hostConfig.UsernsMode.IsHost() {
|
|
- return warnings, fmt.Errorf("Cannot share the host PID namespace when user namespaces are enabled")
|
|
|
|
|
|
+ return warnings, fmt.Errorf("cannot share the host PID namespace when user namespaces are enabled")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if hostConfig.CgroupParent != "" && UsingSystemd(daemon.configStore) {
|
|
if hostConfig.CgroupParent != "" && UsingSystemd(daemon.configStore) {
|
|
@@ -1125,7 +1125,7 @@ func setupDaemonRoot(config *config.Config, rootDir string, rootIDs idtools.IDPa
|
|
break
|
|
break
|
|
}
|
|
}
|
|
if !idtools.CanAccess(dirPath, rootIDs) {
|
|
if !idtools.CanAccess(dirPath, rootIDs) {
|
|
- return fmt.Errorf("A subdirectory in your graphroot path (%s) restricts access to the remapped root uid/gid; please fix by allowing 'o+x' permissions on existing directories.", config.Root)
|
|
|
|
|
|
+ return fmt.Errorf("a subdirectory in your graphroot path (%s) restricts access to the remapped root uid/gid; please fix by allowing 'o+x' permissions on existing directories", config.Root)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|