Docker history 命令

 Docker 命令大全Docker 命令大全


docker history : 查看指定鏡像的創(chuàng)建歷史。

語法

docker history [OPTIONS] IMAGE

OPTIONS說明:

  • -H :以可讀的格式打印鏡像大小和日期,默認(rèn)為true;

  • --no-trunc :顯示完整的提交記錄;

  • -q :僅列出提交記錄ID。

實(shí)例

查看本地鏡像w3cschool/ubuntu:v3的創(chuàng)建歷史。

root@w3cschool:~# docker history w3cschool/ubuntu:v3
IMAGE             CREATED           CREATED BY                                      SIZE      COMMENT
4e3b13c8a266      3 months ago      /bin/sh -c #(nop) CMD ["/bin/bash"]             0 B                 
<missing>         3 months ago      /bin/sh -c sed -i 's/^#\s*\(deb.*universe\)$/   1.863 kB            
<missing>         3 months ago      /bin/sh -c set -xe   && echo '#!/bin/sh' > /u   701 B               
<missing>         3 months ago      /bin/sh -c #(nop) ADD file:43cb048516c6b80f22   136.3 MB

 Docker 命令大全Docker 命令大全