Docker history命令具有什么功能呢?
下文笔者讲述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
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。