From a3acc4f97775a446f93deeb924ab99b708bcfe88 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 24 Apr 2020 11:41:37 +0200 Subject: podman: add support for --rootfs Signed-off-by: Giuseppe Scrivano --- pkg/specgen/generate/config_linux_cgo.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/specgen/generate/config_linux_cgo.go') diff --git a/pkg/specgen/generate/config_linux_cgo.go b/pkg/specgen/generate/config_linux_cgo.go index b06ef5c9a..5d629a6e6 100644 --- a/pkg/specgen/generate/config_linux_cgo.go +++ b/pkg/specgen/generate/config_linux_cgo.go @@ -24,6 +24,9 @@ func getSeccompConfig(s *specgen.SpecGenerator, configSpec *spec.Spec, img *imag } if scp == seccomp.PolicyImage { + if img == nil { + return nil, errors.New("cannot read seccomp profile without a valid image") + } labels, err := img.Labels(context.Background()) if err != nil { return nil, err -- cgit v1.2.3-54-g00ecf