docker 镜像相关命令
1、查看
docker images
docker images -q #查看所有镜像ID
[root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE nginx latest f9c14fe76d50 3 hours ago 143MB nginx <none> a7be6198544f 41 hours ago 142MB jenkin01/onlyoffice_env 3.0 782d04685bdf 7 days ago 6.09GB nginx <none> 448a08f1d2f9 3 weeks ago 142MB redis latest 116cad43b6af 3 weeks ago 117MB jenkin01/onlyoffice_env 2.8 ff9de8a8b76f 3 weeks ago 4.68GB rabbitmq management bdbb33c5199d 3 weeks ago 276MB nginx 1.11.6-alpine d964ab5d0abe 6 years ago 54.9MB mysql 5.7.16 d9124e6c552f 6 years ago 383MB
表头说明
REPOSITORY : 仓库名称(镜像名称)
TAG : 版本号(latest最新版本)
IMAGE ID : 镜像ID
CREATED : 创建时间
SIZE : 大小
2.搜索
docker search XXXX(镜像名称)
例:
docker search redis
docker search nginx
3.拉取
docker pull XXXX(镜像名称)
例:
docker pull redis
docker pull nginx
4.删除
docker rmi xxxx(镜像ID或名称)
docker rm xxxx(镜像ID或名称)
全部删除
docker rmi 'docker images -q'
例:
docker rmi redis
docker rm nginx
标签:ago,命令,nginx,images,镜像,docker,ID From: https://www.cnblogs.com/stevenchen2016/p/17430329.html