由于内存地址无效导致运行时错误,无法使用 Podman 构建镜像容器

由于内存地址无效导致运行时错误,无法使用 Podman 构建镜像容器

Dockerfile:

FROM vault:latest

RUN apk --no-cache add \
    perl-utils

我使用的命令:

podman build -t vaultplugin vaultplugin.Dockerfile

我收到的错误:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x12d10aa]

goroutine 1 [running]:
github.com/containers/buildah/imagebuildah.BuildDockerfiles(0x1bad1e0, 0xc0000b4018, 0x1bd5580, 0xc0002ed7a0, 0xc000642ac0, 0x3d, 0x0, 0x0, 0x0, 0x0, ...)
        vendor/github.com/containers/buildah/imagebuildah/build.go:204 +0xd9a
github.com/containers/libpod/libpod.(*Runtime).Build(0xc00067a000, 0x1bad1e0, 0xc0000b4018, 0xc000642ac0, 0x3d, 0x0, 0x0, 0x0, 0x0, 0x3, ...)
        libpod/runtime_img.go:150 +0xba
github.com/containers/libpod/pkg/adapter.(*LocalRuntime).Build(0xc00047e910, 0x1bad1e0, 0xc0000b4018, 0x2bc9120, 0xc000642ac0, 0x3d, 0x0, 0x0, 0x0, 0x0, ...)
        pkg/adapter/runtime.go:316 +0x2e8
main.buildCmd(0x2bc9120, 0x0, 0x0)
        cmd/podman/build.go:321 +0xf45
main.glob..func2(0x2b585c0, 0xc00026efc0, 0x1, 0x3, 0x0, 0x0)
        cmd/podman/build.go:44 +0xd0
github.com/spf13/cobra.(*Command).execute(0x2b585c0, 0xc0000be020, 0x3, 0x3, 0x2b585c0, 0xc0000be020)
        vendor/github.com/spf13/cobra/command.go:826 +0x473
github.com/spf13/cobra.(*Command).ExecuteC(0x2b616c0, 0x0, 0x0, 0x413000)
        vendor/github.com/spf13/cobra/command.go:914 +0x2f8
github.com/spf13/cobra.(*Command).Execute(0x2b616c0, 0x6, 0x192e1e0)
        vendor/github.com/spf13/cobra/command.go:864 +0x2b
main.main()
        cmd/podman/main.go:160 +0x63

所以问题是......我做错了什么?

答案1

我认为这是一个同样的问题:

https://github.com/containers/buildah/pull/1795

因此你可能需要更新已安装的 podman

相关内容