|
@@ -276,21 +276,6 @@ func validateHostConfig(hostConfig *containertypes.HostConfig, platform string)
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
- if hostConfig.Privileged {
|
|
|
- for _, deviceMapping := range hostConfig.Devices {
|
|
|
- if deviceMapping.PathOnHost == deviceMapping.PathInContainer {
|
|
|
- continue
|
|
|
- }
|
|
|
- if _, err := os.Stat(deviceMapping.PathInContainer); err != nil {
|
|
|
- if os.IsNotExist(err) {
|
|
|
- continue
|
|
|
- }
|
|
|
- return errors.Wrap(err, "error stating device path in container")
|
|
|
- }
|
|
|
- return errors.Errorf("container device path: %s must be different from any host device path for privileged mode containers", deviceMapping.PathInContainer)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
if hostConfig.AutoRemove && !hostConfig.RestartPolicy.IsNone() {
|
|
|
return errors.Errorf("can't create 'AutoRemove' container with restart policy")
|
|
|
}
|