Skip to content

Commit

Permalink
Add crane recipe for listing files, add note about symlinks (#1072)
Browse files Browse the repository at this point in the history
  • Loading branch information
imjasonh committed Jul 9, 2021
1 parent 628a2ff commit b448aba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/crane/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@

Useful tips and things you can do with `crane` and other standard tools.

### List files in an image

```
crane export ubuntu - | tar -tvf - | less
```

### 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`)
Note: Be sure to remove the leading `/` from the path (not `/etc/passwd`). This behavior will not follow symlinks.

### Bundle directory contents into an image

Expand Down

0 comments on commit b448aba

Please sign in to comment.