Signed-off-by: Misty Stanley-Jones <misty@docker.com>
| ... | ... |
@@ -21,7 +21,7 @@ func NewDiffCommand(dockerCli *command.DockerCli) *cobra.Command {
|
| 21 | 21 |
|
| 22 | 22 |
return &cobra.Command{
|
| 23 | 23 |
Use: "diff CONTAINER", |
| 24 |
- Short: "Inspect changes on a container's filesystem", |
|
| 24 |
+ Short: "Inspect changes to files or directories on a container's filesystem", |
|
| 25 | 25 |
Args: cli.ExactArgs(1), |
| 26 | 26 |
RunE: func(cmd *cobra.Command, args []string) error {
|
| 27 | 27 |
opts.container = args[0] |
| ... | ... |
@@ -13,36 +13,53 @@ keywords: "list, changed, files, container" |
| 13 | 13 |
will be rejected. |
| 14 | 14 |
--> |
| 15 | 15 |
|
| 16 |
-# diff |
|
| 16 |
+## diff |
|
| 17 | 17 |
|
| 18 | 18 |
```markdown |
| 19 | 19 |
Usage: docker diff CONTAINER |
| 20 | 20 |
|
| 21 |
-Inspect changes on a container's filesystem |
|
| 21 |
+Inspect changes to files or directories on a container's filesystem |
|
| 22 | 22 |
|
| 23 | 23 |
Options: |
| 24 | 24 |
--help Print usage |
| 25 | 25 |
``` |
| 26 | 26 |
|
| 27 |
-List the changed files and directories in a container᾿s filesystem. |
|
| 28 |
- There are 3 events that are listed in the `diff`: |
|
| 27 |
+List the changed files and directories in a container᾿s filesystem since the |
|
| 28 |
+container was created. Three different types of change are tracked: |
|
| 29 | 29 |
|
| 30 |
-1. `A` - Add |
|
| 31 |
-2. `D` - Delete |
|
| 32 |
-3. `C` - Change |
|
| 30 |
+| Symbol | Description | |
|
| 31 |
+|--------|---------------------------------| |
|
| 32 |
+| `A` | A file or directory was added | |
|
| 33 |
+| `D` | A file or directory was deleted | |
|
| 34 |
+| `C` | A file or directory was changed | |
|
| 33 | 35 |
|
| 34 |
-For example: |
|
| 36 |
+You can use the full or shortened container ID or the container name set using |
|
| 37 |
+`docker run --name` option. |
|
| 35 | 38 |
|
| 36 |
- $ docker diff 7bb0e258aefe |
|
| 39 |
+## Examples |
|
| 37 | 40 |
|
| 38 |
- C /dev |
|
| 39 |
- A /dev/kmsg |
|
| 40 |
- C /etc |
|
| 41 |
- A /etc/mtab |
|
| 42 |
- A /go |
|
| 43 |
- A /go/src |
|
| 44 |
- A /go/src/github.com |
|
| 45 |
- A /go/src/github.com/docker |
|
| 46 |
- A /go/src/github.com/docker/docker |
|
| 47 |
- A /go/src/github.com/docker/docker/.git |
|
| 48 |
- .... |
|
| 41 |
+Inspect the changes to an `nginx` container: |
|
| 42 |
+ |
|
| 43 |
+```bash |
|
| 44 |
+$ docker diff 1fdfd1f54c1b |
|
| 45 |
+ |
|
| 46 |
+C /dev |
|
| 47 |
+C /dev/console |
|
| 48 |
+C /dev/core |
|
| 49 |
+C /dev/stdout |
|
| 50 |
+C /dev/fd |
|
| 51 |
+C /dev/ptmx |
|
| 52 |
+C /dev/stderr |
|
| 53 |
+C /dev/stdin |
|
| 54 |
+C /run |
|
| 55 |
+A /run/nginx.pid |
|
| 56 |
+C /var/lib/nginx/tmp |
|
| 57 |
+A /var/lib/nginx/tmp/client_body |
|
| 58 |
+A /var/lib/nginx/tmp/fastcgi |
|
| 59 |
+A /var/lib/nginx/tmp/proxy |
|
| 60 |
+A /var/lib/nginx/tmp/scgi |
|
| 61 |
+A /var/lib/nginx/tmp/uwsgi |
|
| 62 |
+C /var/log/nginx |
|
| 63 |
+A /var/log/nginx/access.log |
|
| 64 |
+A /var/log/nginx/error.log |
|
| 65 |
+``` |
| ... | ... |
@@ -2,7 +2,7 @@ |
| 2 | 2 |
% Docker Community |
| 3 | 3 |
% JUNE 2014 |
| 4 | 4 |
# NAME |
| 5 |
-docker-diff - Inspect changes on a container's filesystem |
|
| 5 |
+docker-diff - Inspect changes to files or directories on a container's filesystem |
|
| 6 | 6 |
|
| 7 | 7 |
# SYNOPSIS |
| 8 | 8 |
**docker diff** |
| ... | ... |
@@ -10,8 +10,16 @@ docker-diff - Inspect changes on a container's filesystem |
| 10 | 10 |
CONTAINER |
| 11 | 11 |
|
| 12 | 12 |
# DESCRIPTION |
| 13 |
-Inspect changes on a container's filesystem. You can use the full or |
|
| 14 |
-shortened container ID or the container name set using |
|
| 13 |
+List the changed files and directories in a container᾿s filesystem since the |
|
| 14 |
+container was created. Three different types of change are tracked: |
|
| 15 |
+ |
|
| 16 |
+| Symbol | Description | |
|
| 17 |
+|--------|---------------------------------| |
|
| 18 |
+| `A` | A file or directory was added | |
|
| 19 |
+| `D` | A file or directory was deleted | |
|
| 20 |
+| `C` | A file or directory was changed | |
|
| 21 |
+ |
|
| 22 |
+You can use the full or shortened container ID or the container name set using |
|
| 15 | 23 |
**docker run --name** option. |
| 16 | 24 |
|
| 17 | 25 |
# OPTIONS |
| ... | ... |
@@ -19,28 +27,32 @@ shortened container ID or the container name set using |
| 19 | 19 |
Print usage statement |
| 20 | 20 |
|
| 21 | 21 |
# EXAMPLES |
| 22 |
-Inspect the changes to on a nginx container: |
|
| 23 |
- |
|
| 24 |
- # docker diff 1fdfd1f54c1b |
|
| 25 |
- C /dev |
|
| 26 |
- C /dev/console |
|
| 27 |
- C /dev/core |
|
| 28 |
- C /dev/stdout |
|
| 29 |
- C /dev/fd |
|
| 30 |
- C /dev/ptmx |
|
| 31 |
- C /dev/stderr |
|
| 32 |
- C /dev/stdin |
|
| 33 |
- C /run |
|
| 34 |
- A /run/nginx.pid |
|
| 35 |
- C /var/lib/nginx/tmp |
|
| 36 |
- A /var/lib/nginx/tmp/client_body |
|
| 37 |
- A /var/lib/nginx/tmp/fastcgi |
|
| 38 |
- A /var/lib/nginx/tmp/proxy |
|
| 39 |
- A /var/lib/nginx/tmp/scgi |
|
| 40 |
- A /var/lib/nginx/tmp/uwsgi |
|
| 41 |
- C /var/log/nginx |
|
| 42 |
- A /var/log/nginx/access.log |
|
| 43 |
- A /var/log/nginx/error.log |
|
| 22 |
+ |
|
| 23 |
+Inspect the changes to an `nginx` container: |
|
| 24 |
+ |
|
| 25 |
+```bash |
|
| 26 |
+$ docker diff 1fdfd1f54c1b |
|
| 27 |
+ |
|
| 28 |
+C /dev |
|
| 29 |
+C /dev/console |
|
| 30 |
+C /dev/core |
|
| 31 |
+C /dev/stdout |
|
| 32 |
+C /dev/fd |
|
| 33 |
+C /dev/ptmx |
|
| 34 |
+C /dev/stderr |
|
| 35 |
+C /dev/stdin |
|
| 36 |
+C /run |
|
| 37 |
+A /run/nginx.pid |
|
| 38 |
+C /var/lib/nginx/tmp |
|
| 39 |
+A /var/lib/nginx/tmp/client_body |
|
| 40 |
+A /var/lib/nginx/tmp/fastcgi |
|
| 41 |
+A /var/lib/nginx/tmp/proxy |
|
| 42 |
+A /var/lib/nginx/tmp/scgi |
|
| 43 |
+A /var/lib/nginx/tmp/uwsgi |
|
| 44 |
+C /var/log/nginx |
|
| 45 |
+A /var/log/nginx/access.log |
|
| 46 |
+A /var/log/nginx/error.log |
|
| 47 |
+``` |
|
| 44 | 48 |
|
| 45 | 49 |
|
| 46 | 50 |
# HISTORY |