1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #44183 from thaJeztah/22.06_backport_remove_os_check

[22.06 backport] Remove the OS check when creating a container
This commit is contained in:
Sebastiaan van Stijn 2022-09-22 21:37:39 +02:00 committed by GitHub
commit 0e873d5cd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,6 @@ import (
"github.com/docker/docker/errdefs"
"github.com/docker/docker/image"
"github.com/docker/docker/pkg/idtools"
"github.com/docker/docker/pkg/system"
"github.com/docker/docker/runconfig"
v1 "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/opencontainers/selinux/go-selinux"
@ -124,9 +123,6 @@ func (daemon *Daemon) create(opts createOpts) (retC *container.Container, retErr
return nil, err
}
os = img.OperatingSystem()
if !system.IsOSSupported(os) {
return nil, system.ErrNotSupportedOperatingSystem
}
imgID = img.ID()
} else if isWindows {
os = "linux" // 'scratch' case.