[Docker]镜像操作

获取镜像
[root@Proxy ~]# docker pull tomcat
Using default tag: latest
latest: Pulling from library/tomcat
7e2b2a5af8f6: Pull complete 
09b6f03ffac4: Pull complete 
dc3f0c679f0f: Pull complete 
fd4b47407fc3: Pull complete 
bb40faab53a2: Pull complete 
1015b1b4c9ac: Pull complete 
dc9b56c32795: Pull complete 
7cc86ac3141b: Pull complete 
a87d3a3ed1af: Pull complete 
4ef7fc58bece: Pull complete 
Digest: sha256:1458fb9bb9d3d46d3129f95849233e31d82391723830ebd61441c24635460b84
Status: Downloaded newer image for tomcat:latest
docker.io/library/tomcat:latest
查看Docker镜像
[root@Proxy ~]# docker images
REPOSITORY                      TAG                 IMAGE ID            CREATED             SIZE
tomcat                          latest              31a47677561a        2 days ago          529MB
zabbix/zabbix-server-mysql      latest              fbc86ce35f52        2 weeks ago         64.7MB
zabbix/zabbix-web-nginx-mysql   latest              0efb08709a91        2 weeks ago         167MB
mysql                           5.7                 413be204e9c3        2 weeks ago         456MB
zabbix/zabbix-agent             centos-4.4-latest   322c6c685990        3 weeks ago         229MB
Docker体积
[root@Proxy ~]# docker system df
TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              5                   0                   1.44GB              1.44GB (100%)
Containers          0                   0                   0B                  0B
Local Volumes       19                  0                   312.8MB             312.8MB (100%)
Build Cache         0                   0                   0B                  0B
Docker 删除镜像
[root@Proxy ~]# docker rmi nginx
Untagged: nginx:latest
Untagged: nginx@sha256:d81f010955749350ef31a119fb94b180fde8b2f157da351ff5667ae037968b28
Deleted: sha256:e791337790a6181d5ce870b3bb16de1a4d5aa3a916e8fba6907f57eb409934cf
Deleted: sha256:615a169a3412634ebf75d5f0f5162290fb6042ba36285bd0ddc9ee123165b95e
Deleted: sha256:bd32d67adcec3dba661c5afebc8a2a5413e68a3283b5ad7df134ed86f00b380a
Deleted: sha256:b60e5c3bcef2f42ec42648b3acf7baf6de1fa780ca16d9180f3b4a3f266fe7bc

END

猜你喜欢

转载自www.cnblogs.com/leoshi/p/12735589.html