Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit cfd176b

Browse files
author
Priya Wadhwa
committed
update readme
1 parent cf169f6 commit cfd176b

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ You can similarly run many analyzers at once:
6666
container-diff diff <img1> <img2> --types=history,apt,node
6767
```
6868

69+
To view the diff of an individual file in two different images, you can use the filename flag in conjuction with the file system diff analyzer.
70+
71+
```
72+
container-diff diff <img1> <img2> --types=file --filename=/path/to/file
73+
```
74+
6975
All of the analyzer flags with their long versions can be seen below:
7076

7177
| Differ | Short flag | Long Flag |
@@ -265,6 +271,37 @@ Packages found only in gcr.io/google-appengine/python:2017-06-29-190410: None
265271
Version differences: None
266272
267273
```
274+
```
275+
$ container-diff diff file1.tar file2.tar --types=file --filename=go/src/app/file.txt
276+
Starting diff on images file1.tar and file2.tar, using differs: [file]
277+
Retrieving image file2.tar from source Tar Archive
278+
Retrieving image file1.tar from source Tar Archive
279+
Computing diffs
280+
281+
-----File-----
282+
283+
These entries have been added to file1.tar: None
284+
285+
These entries have been deleted from file1.tar: None
286+
287+
These entries have been changed between file1.tar and file2.tar:
288+
FILE SIZE1 SIZE2
289+
/go/src/app/file.txt 30B 30B
290+
291+
Computing filename diffs
292+
293+
-----Diff of go/src/app/file.txt-----
294+
295+
296+
--- file1.tar
297+
+++ file2.tar
298+
@@ -1 +1 @@
299+
-This is file 1
300+
This is a file
301+
+This is file 2
302+
This is a file
303+
```
304+
268305
## Example Run with JSON post-processing
269306
The following example demonstrates how one might selectively display the output of their diff, such that version differences are ignored and only package absence/presence is displayed and the packages present in only one image are sorted by size in descending order. A small piece of the JSON being post-processed can be seen below:
270307
```

0 commit comments

Comments
 (0)