无法在新的 Centos8 上使用 docker/podman

无法在新的 Centos8 上使用 docker/podman

我有一台全新的 CentOS 8 机器。由于不知道“podman”,我安装了 docker: yum install docker。这实际上安装了 podman 1.0.5。

我无法运行任何图像:

devrisenshine2 [wiretap_wrapper] % podman run -it --rm alpine sh
error creating libpod runtime: Error running podman info while refreshing state: exit status 1
devrisenshine2 [wiretap_wrapper] % sudo podman run -it --rm alpine sh
container create failed: cannot specify gid= mount options for unmapped gid in rootless containers
: internal libpod error

我理解 /etc/sub?id 与此相关:

devrisenshine2 [wiretap_wrapper] % cat /etc/subuid
garyo:100000:65536
devrisenshine2 [wiretap_wrapper] % cat /etc/subgid
garyo:100000:65536
devrisenshine2 [wiretap_wrapper] % ls -l /etc/sub?id
-rw-r--r-- 1 root root 19 Jan 10 15:32 /etc/subgid
-rw-r--r-- 1 root root 19 Jan 10 15:32 /etc/subuid

经过谷歌搜索,我发现我需要安装一些其他的东西:

sudo dnf install -y @container-tools

安装了 buildah、ocio-umount 和 skopeo,但没有任何变化。之后我也重启了。

我不确定下一步该做什么。我使用 docker 多年,但从来没用过 podman。也许我错过了配置步骤?

看起来 podman 的后续版本可能会有一些修复,但是在这台机器上我不想安装所有构建工具和依赖项来从头开始构建 podman。

哦,这是我的podman info

devrisenshine2 [wiretap_wrapper] % podman info
ERRO[0000] cannot setup namespace using newuidmap: exit status 1 
devrisenshine2 [wiretap_wrapper] % sudo podman info
host:
  BuildahVersion: 1.6-dev
  Conmon:
    package: podman-1.0.5-1.gitf604175.module_el8.0.0+194+ac560166.x86_64
    path: /usr/libexec/podman/conmon
    version: 'conmon version 1.14.0-dev, commit: db4132fdf7a7a29546679331f7119a745266f613-dirty'
  Distribution:
    distribution: '"centos"'
    version: "8"
  MemFree: 1359548416
  MemTotal: 1585446912
  OCIRuntime:
    package: runc-1.0.0-55.rc5.dev.git2abd837.module_el8.0.0+58+91b614e7.x86_64
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.0'
  SwapFree: 2122317824
  SwapTotal: 2122317824
  arch: amd64
  cpus: 2
  hostname: devrisenshine2
  kernel: 5.3.13-1-pve
  os: linux
  rootless: false
  uptime: 1m 40s
insecure registries:
  registries: []
registries:
  registries:
  - registry.redhat.io
  - quay.io
  - docker.io
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 0
  GraphDriverName: overlay
  GraphOptions: null
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 2
  RunRoot: /var/run/containers/storage

我可能遗漏了什么?

相关内容