centos - Podman 图像未使用 podman 图像 ls 显示

标签 centos containers rhel podman

我正在尝试在 Red Hat Enterprise Linux 8 (CentoOS 8) 虚拟机中设置构建服务器。

我通过运行 sudo dnf install -y @container-tools 安装了 podman

然后我跑了sudo podman pull mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim从 docker 拉取容器镜像:

Trying to pull mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim...Getting image source signatures
Copying blob e936bd534ffb done
Copying blob caf64655bcbb done
Copying blob 4156e490f05f done
Copying blob 68ced04f60ab done
Copying blob 7064c3d93b4a done
Copying config e2cd20adb1 done
Writing manifest to image destination
Storing signatures
e2cd20adb1292ef24ca70de7abaddaadd57a5c932d3852b972e43b6f05a03dea



这对我来说看起来很成功。如果我再次运行它,我会被告知这些层“已经存在”。但后来我运行:
podman image ls

我得到一个空列表:

REPOSITORY TAG IMAGE ID CREATED SIZE



我还尝试了以下命令来获取列表:
  • podman image ls -a
  • podman image list
  • podman image list -a
  • podman images
  • podman images ls
  • podman images ls -a
  • podman images list
  • podman images list -a

  • 他们都给出了一个空列表。

    如何查看我拉下的容器镜像?

    更新:我跑了 sudo podman run --rm --name=linuxconfig-test -p 80:80 httpd并且(在另一台机器上)浏览到我的 linux 机器的 IP 地址并得到 It Works!显示。所以 podman 至少有一部分在工作。

    最佳答案

    与 Docker 不同,Podman 将图像存储在用户的主目录中。默认路径为 ~/.local/share/containers/storage可以通过运行 podman info 来验证.由于您执行了podman pull以 root 身份,拉取的镜像将存储在 root 用户的主目录中。这就是为什么运行 podman image ls 时没有列出图像的原因没有 sudo .

    podman 背后的主要思想是它可以完全在用户模式下运行,而无需连接到特权守护进程。理想情况下,所有 podman 命令都应该在没有 sudo 的情况下运行。 .

    关于centos - Podman 图像未使用 podman 图像 ls 显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60460705/

    相关文章:

    c++ - 二维动态容器qt

    从源代码 : gcc. orig: 目录构建时出现 Python 2.7.6 错误:没有这样的文件或目录

    ruby - Zlib 对 CentOS 的 Gitlab 包的依赖

    python - 导入错误 : No module named rpm

    c++ - std::unordered_set::reserve 对于容器内存需求的作用?

    linux - 从 Vagrant 脚本设置 RHEL box 的 ip

    linux - 如何创建分区的gunzip 文件进行备份

    python - 使用 virtualenv 安装 gdal 1.11

    linux - 在 Thunar 中远程创建自定义操作

    c++ - 我应该使用什么类型的稀疏 vector ?