1. docker diff

1.1. 描述

查看容器文件系统中文件及目录与创建时相比的改变。

可以使用长的容器ID、或者短的容器ID、或者容器的名称来使用。

容器有3种不同的改变类型,每种类型都有特殊的标识符号

标识符号 描述
A 文件或目录新加 Add
D 文件或目录删除 Deleted
C 文件或目录修改 Changed

1.2. 帮助

$ docker diff --help

Usage: docker diff CONTAINER

Inspect changes to files or directories on a container's filesystem

1.3. 选项

1.4. 示例

  • 查看nginx容器的改变
 docker diff 1fdfd1f54c1b

C /dev
C /dev/console
C /dev/core
C /dev/stdout
C /dev/fd
C /dev/ptmx
C /dev/stderr
C /dev/stdin
C /run
A /run/nginx.pid
C /var/lib/nginx/tmp
A /var/lib/nginx/tmp/client_body
A /var/lib/nginx/tmp/fastcgi
A /var/lib/nginx/tmp/proxy
A /var/lib/nginx/tmp/scgi
A /var/lib/nginx/tmp/uwsgi
C /var/log/nginx
A /var/log/nginx/access.log
A /var/log/nginx/error.log$

1.5. 参考

https://docs.docker.com/v18.09/engine/reference/commandline/diff/

Copyright © 温玉 2021 | 浙ICP备2020032454号 all right reserved,powered by Gitbook该文件修订时间: 2022-03-13 11:28:02

results matching ""

    No results matching ""