Merge pull request #44181 from rumpl/remove-os-check

Remove the OS check when creating a container
This commit is contained in:
Brian Goff 2022-09-22 09:45:55 -07:00 committed by GitHub
commit c5c3568573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

@ -18,7 +18,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"
@ -132,9 +131,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.