From 2bc36de6386c74a825c3f28e445395d8b2156b2b Mon Sep 17 00:00:00 2001 From: Djordje Lukic Date: Thu, 22 Sep 2022 17:27:10 +0200 Subject: [PATCH] Remove the OS check when creating a container Now that we can pass any custom containerd shim to dockerd there is need for this check. Without this it becomes possible to use wasm shims for example with images that have "wasi" as the OS. Signed-off-by: Djordje Lukic (cherry picked from commit 1a3d8019d1ddb82e8a6b437a8eccf2d22cbc8b5d) Signed-off-by: Sebastiaan van Stijn --- daemon/create.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/daemon/create.go b/daemon/create.go index 4d44d01ca6..fc21340da6 100644 --- a/daemon/create.go +++ b/daemon/create.go @@ -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.