1、显示容器注册表配置文件
cat /home/student/.config/f
unqualified-search-registries = ['ample'][[registry]]
location = "ample"
insecure = true
blocked = false
2、使用podman search 查找,例子:在注册表中搜索名称以“ubi”开头的镜像
podman search ample/ubi
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
example ample/ubi7/ubi 0
example ample/ubi8/ubi 0
3、使用podman login 命令登录容器注册表,可以使用podman --help查看帮助,--useradmin 直接带用户名。
podman login ample --username admin --password redhat321
WARNING! Using --password via the cli is insecure. Please consider using --password-stdin
Login Succeeded!
4、提取镜像:podman pull,从注册表中提取容器镜像。
podman pull ample/rhel8/httpd-24
Trying to pull ample/
Getting image source signatures
Copying blob 9d20433efa0c skipped: already exists
Copying blob 77c58f19bd6e skipped: already exists
Copying blob 47db82df7f3f skipped: already exists
Copying config 7e93f25a94 done
Writing manifest to image destination
Storing signatures
7e93f25a946892c9c175b74a0915c96469e3b4845a6da9f214fd3ec19c3d7070已上为已经安装过,再执行了,所以报已存在了。
5、查看镜像:podman image,查看本地存储镜像。下图是上面提取完的镜像。
podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
ample/rhel8/httpd-24 latest 7e93f25a9468 22 months ago 430 MB
6、删除镜像:podman rmi移除本地存储的镜像
podman rmi ample/rhel8/httpd-24:latest
Untagged: ample/rhel8/httpd-24:latest
Deleted: 7e93f25a946892c9c175b74a0915c96469e3b4845a6da9f214fd3ec19c3d7070再次查看:显示为空
podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
已上为podmon增删改查的基本操作。
本文发布于:2024-02-02 10:24:04,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170684064543174.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |