-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# `crane` Recipes | ||
|
||
Useful tips and things you can do with `crane` and other standard tools. | ||
|
||
### Extract a single file from an image | ||
|
||
``` | ||
crane export ubuntu - | tar -Oxf - etc/passwd | ||
``` | ||
|
||
Note: Be sure to remove the leading `/` from the path (not `/etc/passwd`) | ||
|
||
### Bundle directory contents into an image | ||
|
||
``` | ||
crane append -f <(tar -f - -c some-dir/) -t ${IMAGE} | ||
``` | ||
|
||
By default, this produces an image with one layer containing the directory contents. Add `-b ${BASE_IMAGE}` to append the layer to a base image instead. | ||
|
||
### Diff two configs | ||
|
||
``` | ||
diff <(crane config busybox:1.32 | jq) <(crane config busybox:1.33 | jq) | ||
``` | ||
|
||
### Diff two manifests | ||
|
||
``` | ||
diff <(crane manifest busybox:1.32 | jq) <(crane manifest busybox:1.33 | jq) | ||
``` |