diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go index 09483bbb9b..1fbdf7b7d6 100644 --- a/pkg/specgen/generate/container_create.go +++ b/pkg/specgen/generate/container_create.go @@ -250,6 +250,9 @@ func MakeContainer(ctx context.Context, rt *libpod.Runtime, s *specgen.SpecGener options = append(options, opts...) } runtimeSpec, err := SpecGenToOCI(ctx, s, rt, rtc, newImage, finalMounts, pod, command, compatibleOptions) + if err != nil { + return nil, nil, nil, err + } if clone { // the container fails to start if cloned due to missing Linux spec entries if c == nil { return nil, nil, nil, errors.New("the given container could not be retrieved")