From b0abd1c36ec5643c803b97a1c82f8d3121f902d4 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Tue, 11 Feb 2020 09:47:45 +0100 Subject: container create: relax os/arch checks Relax the os/arch checks when creating a container and only info-log mismatches instead of erroring out. There are too many images used in the wild which do not set their arch correctly correctly. Erroring out has hit users sufficiently enough to justify relaxing the errors and only log to at least inform the users and image vendors. Signed-off-by: Valentin Rothberg --- cmd/podman/shared/create.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go index 010c80373..3062b0ca3 100644 --- a/cmd/podman/shared/create.go +++ b/cmd/podman/shared/create.go @@ -109,11 +109,11 @@ func CreateContainer(ctx context.Context, c *GenericCLIResults, runtime *libpod. } if overrideOS == "" && imageData.Os != goruntime.GOOS { - return nil, nil, errors.Errorf("incompatible image OS %q on %q host", imageData.Os, goruntime.GOOS) + logrus.Infof("Using %q (OS) image on %q host", imageData.Os, goruntime.GOOS) } if overrideArch == "" && imageData.Architecture != goruntime.GOARCH { - return nil, nil, errors.Errorf("incompatible image architecture %q on %q host", imageData.Architecture, goruntime.GOARCH) + logrus.Infof("Using %q (architecture) on %q host", imageData.Architecture, goruntime.GOARCH) } names := newImage.Names() -- cgit v1.2.3-54-g00ecf