Docker history命令具有什么功能呢?

书欣 Docker 发布时间:2023-01-18 14:20:16 阅读数:7134 1
下文笔者讲述Docker中history命令的功能简介说明,如下所示
docker history功能:
    查看一个镜像的创建历史

docker history命令语法

 
docker history [OPTIONS] IMAGE

OPTIONS说明:
   -H:采用可读的格式打印镜像大小和日期,默认为true
   --no-trunc :显示完整的提交记录
   -q:仅列出提交记录ID
例:docker history命令的示例分享
[root@node0 tmp]# docker history nginx
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
0e901e68141f        7 months ago        /bin/sh -c #(nop)  CMD ["nginx" "-g" "daem...   0 B                 
<missing>           7 months ago        /bin/sh -c #(nop)  STOPSIGNAL SIGQUIT           0 B                 
<missing>           7 months ago        /bin/sh -c #(nop)  EXPOSE 80                    0 B                 
<missing>           7 months ago        /bin/sh -c #(nop)  ENTRYPOINT ["/docker-en...   0 B                 
<missing>           7 months ago        /bin/sh -c #(nop) COPY file:09a214a3e07c91...   4.61 kB             
<missing>           7 months ago        /bin/sh -c #(nop) COPY file:0fd5fca330dcd6...   1.04 kB             
<missing>           7 months ago        /bin/sh -c #(nop) COPY file:0b866ff3fc1ef5...   1.96 kB             
<missing>           7 months ago        /bin/sh -c #(nop) COPY file:65504f71f5855c...   1.2 kB              
<missing>           7 months ago        /bin/sh -c set -x     && addgroup --system...   61.1 MB             
<missing>           7 months ago        /bin/sh -c #(nop)  ENV PKG_RELEASE=1~bullseye   0 B                 
<missing>           7 months ago        /bin/sh -c #(nop)  ENV NJS_VERSION=0.7.3        0 B                 
<missing>           7 months ago        /bin/sh -c #(nop)  ENV NGINX_VERSION=1.21.6     0 B                 
<missing>           7 months ago        /bin/sh -c #(nop)  LABEL maintainer=NGINX ...   0 B                 
<missing>           7 months ago        /bin/sh -c #(nop)  CMD ["bash"]                 0 B                 
<missing>           7 months ago        /bin/sh -c #(nop) ADD file:134f25aec8adf83...   80.4 MB   
版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。

本文链接: https://www.Java265.com/docker/202301/5419.html

最近发表

热门文章

好文推荐

Java265.com

https://www.java265.com

站长统计|粤ICP备14097017号-3

Powered By Java265.com信息维护小组

使用手机扫描二维码

关注我们看更多资讯

java爱好者