2016-10-14 18:30:36 -04:00
|
|
|
|
---
|
|
|
|
|
title: "diff"
|
|
|
|
|
description: "The diff command description and usage"
|
2016-11-03 18:48:30 -04:00
|
|
|
|
keywords: "list, changed, files, container"
|
2016-10-14 18:30:36 -04:00
|
|
|
|
---
|
2015-06-21 16:41:38 -04:00
|
|
|
|
|
2016-10-19 13:25:45 -04:00
|
|
|
|
<!-- This file is maintained within the docker/docker Github
|
|
|
|
|
repository at https://github.com/docker/docker/. Make all
|
|
|
|
|
pull requests against that repo. If you see this file in
|
|
|
|
|
another repository, consider it read-only there, as it will
|
|
|
|
|
periodically be overwritten by the definitive file. Pull
|
|
|
|
|
requests which include edits to this file in other repositories
|
|
|
|
|
will be rejected.
|
|
|
|
|
-->
|
|
|
|
|
|
2016-12-20 14:47:54 -05:00
|
|
|
|
## diff
|
2015-06-21 16:41:38 -04:00
|
|
|
|
|
2016-07-07 14:43:18 -04:00
|
|
|
|
```markdown
|
|
|
|
|
Usage: docker diff CONTAINER
|
2015-06-21 16:41:38 -04:00
|
|
|
|
|
2016-12-20 14:47:54 -05:00
|
|
|
|
Inspect changes to files or directories on a container's filesystem
|
2015-06-21 16:41:38 -04:00
|
|
|
|
|
2016-07-07 14:43:18 -04:00
|
|
|
|
Options:
|
|
|
|
|
--help Print usage
|
|
|
|
|
```
|
2015-10-03 11:56:41 -04:00
|
|
|
|
|
2016-12-20 14:47:54 -05:00
|
|
|
|
List the changed files and directories in a container᾿s filesystem since the
|
|
|
|
|
container was created. Three different types of change are tracked:
|
2015-06-21 16:41:38 -04:00
|
|
|
|
|
2016-12-20 14:47:54 -05:00
|
|
|
|
| Symbol | Description |
|
|
|
|
|
|--------|---------------------------------|
|
|
|
|
|
| `A` | A file or directory was added |
|
|
|
|
|
| `D` | A file or directory was deleted |
|
|
|
|
|
| `C` | A file or directory was changed |
|
2015-06-21 16:41:38 -04:00
|
|
|
|
|
2016-12-20 14:47:54 -05:00
|
|
|
|
You can use the full or shortened container ID or the container name set using
|
|
|
|
|
`docker run --name` option.
|
2015-06-21 16:41:38 -04:00
|
|
|
|
|
2016-12-20 14:47:54 -05:00
|
|
|
|
## Examples
|
2015-06-21 16:41:38 -04:00
|
|
|
|
|
2016-12-20 14:47:54 -05:00
|
|
|
|
Inspect the changes to an `nginx` container:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
$ 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
|
|
|
|
|
```
|