第3章 docker映象和容器管理的基本命令
阿新 • • 發佈:2020-12-03
安裝完的docker。
1.檢視映象
-
[root@localhost ~]# docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE nginx latest bc9a0695f571 8 days ago 133MB centos 7 8652b9f0cb4c 2 weeks ago 204MB centos 7.9.2009 8652b9f0cb4c 2 weeks ago 204MB centos 7.6.1810 f1cb7c7d58b7 20 months ago 202MB [root@localhost ~]# docker image ls --no-trunc REPOSITORY TAG IMAGE ID CREATED SIZE nginx latest sha256:bc9a0695f5712dcaaa09a5adc415a3936ccba13fc2587dfd76b1b8aeea3f221c 8 days ago 133MB centos 7 sha256:8652b9f0cb4c0599575e5a003f5906876e10c1ceb2ab9fe1786712dac14a50cf 2 weeks ago 204MB centos 7.9.2009 sha256:8652b9f0cb4c0599575e5a003f5906876e10c1ceb2ab9fe1786712dac14a50cf 2 weeks ago 204MB centos 7.6.1810 sha256:f1cb7c7d58b73eac859c395882eec49d50651244e342cd6c68a5c7809785f427 20 months ago 202MB
2.標識映象的唯一方法
-
1、REPOSITORY :TAG centos:latest 2、IMAGE ID (映象id) 0d120b6ccaa8 (sha256:64位的號碼,預設只擷取12位)
3.詳細檢視映象資訊
-
1.通過id號進行檢視(id號不需要全部複製) [root@localhost ~]# docker image inspect bc9a0695f5712dcaaa 2.通過映象名:tag進行檢視 [root@localhost ~]# docker image inspect nginx:latest
4.映象的基礎操作
- 匯出映象