ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
#### 搜索 ``` docker search [options] -f, --filter 根据提供的筛选条件筛选结果 --format string 利用go语言的format格式化输出结果 --limit int 展示的最大结果数量,默认25 --no-trunc 内容全部系那时 ``` ``` docker search -f is-official=true centos 官方 ``` #### 查看 ``` docker images 或者 docker image ls ``` ``` -a, --all 展示所有镜像,默认隐藏底层的镜像 --no-trunc 不缩略显示 -q, --quiet 只显示镜像ID ``` #### 拉取 ``` docker pull centos:7 ``` #### 删除 ``` docker rmi [options] docker image rm [options] -f, --force 强制删除 ``` ``` 删除指定镜像 docker rmi $IMAGE_ID 删除所有镜像 docker rmi $(docker images -q) ``` #### 保存 ``` 将本地一个或多个镜像打包保存成本地tar文件 docker save [options] image -o, --output string 指定写入的文件名和路径 ``` ``` docker save centos:7 ubuntu:14.04 -o test.tar ``` #### 备份导入 ``` 将save命令打包的镜像导入本地镜像库中 ``` ``` docker load [options] -i, --input string 指定要导入的文件,不指定,默认是stdin -q, --quiet 不打印导入过程信息 ``` ``` docker load -i test.tar ``` #### 重命名 ``` 对本地镜像的name, tag进行重命名,并新产生一个命名后镜像 docker tag ``` ``` docker tag centos centos:7.2 ``` #### 详细信息 ``` docker image inspect [options] docker inspect [options] -f, --format string go语言的format格式输出结果 ``` ``` docker image inspect centos ``` #### 历史信息 ``` docker history [options] image -H, --human 将创建时间,大小进行优化打印 -q, --quiet 只显示镜像ID --no-trunc 不缩略显示 ```