Skip to content

Commit

Permalink
recipe: Document diffing filesystem contents (#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
imjasonh committed Nov 2, 2021
1 parent 0dfbb56 commit 0de2b1e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmd/crane/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ diff <(crane config busybox:1.32 | jq) <(crane config busybox:1.33 | jq)
diff <(crane manifest busybox:1.32 | jq) <(crane manifest busybox:1.33 | jq)
```

### Diff filesystem contents

```
diff \
<(crane export gcr.io/kaniko-project/executor:v1.6.0-debug - | tar -tvf - | sort) \
<(crane export gcr.io/kaniko-project/executor:v1.7.0-debug - | tar -tvf - | sort)
```

This will show file size diffs and (unfortunately) modified time diffs.

With some work, you can use `cut` and other built-in Unix tools to ignore these diffs.

### Get total image size

Given an image manifest, you can calculate the total size of all layer blobs and the image's config blob using `jq`:
Expand Down

0 comments on commit 0de2b1e

Please sign in to comment.