
Podman 基础命令模块划分(按功能场景分类)
Podman 作为开源容器管理工具(兼容 Docker 命令语法),基础命令围绕 “镜像生命周期、容器生命周期、仓库交互、系统配置” 四大核心场景设计,可划分为 6 大模块,覆盖从 “镜像获取” 到 “容器运维” 的全流程操作:
一、镜像管理模块(镜像的获取与维护)
核心作用:管理容器镜像(搜索、拉取、查看、删除、校验),是容器创建的基础,确保本地拥有可用的镜像资源。
| 命令 | 核心用途 | 示例 |
|---|---|---|
podman search <镜像名> |
从镜像仓库(如 Docker Hub)搜索指定镜像 | podman search nginx(搜索 nginx 相关镜像) |
podman pull <镜像名:标签> |
拉取指定镜像到本地(标签默认latest) |
podman pull nginx:1.24(拉取 nginx 1.24 版本) |
podman images |
列出本地所有已下载的镜像(含 ID、大小、标签) | podman images(查看本地镜像列表) |
podman inspect <镜像ID/镜像名> |
查看镜像的详细配置(环境变量、暴露端口、存储层) | podman inspect nginx:1.24(查看 nginx 镜像详情) |
podman rmi <镜像ID/镜像名:标签> |
删除本地指定镜像(需先删除依赖该镜像的容器) | podman rmi nginx:1.24(删除 nginx 1.24 镜像) |
podman imag |

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



