Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recipe: Document diffing filesystem contents #1155

Merged
merged 1 commit into from
Nov 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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