一、查看镜像

docker  images

二、搜索镜像

docker   search centos:7  #centos:7代表镜像名称和版本号

三、拉取镜像

docker  pull  centos:7  #centos:7代表镜像名称和版本号

四、删除镜像

docker  rmi   IMAGE ID  #镜像名称或者镜像Id

总结

[root@note1 ~]# docker pull centos:7
7: Pulling from library/centos
2d473b07cdd5: Pull complete
Digest: sha256:c73f515d06b0fa07bb18d8202035e739a494ce760aa73129f60f4bf2bd22b407
Status: Downloaded newer image for centos:7
docker.io/library/centos:7
[root@note1 ~]# docker pull tomcat
[root@note1 ~]# docker pull nginx
[root@note1 ~]# docker images

[root@note1 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 605c77e624dd 8 weeks ago 141MB
tomcat latest fb5657adc892 2 months ago 680MB
centos 7 eeb6ee3f44bd 5 months ago 204MB
以上就是今天我的笔记,有点粗略。

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐