Skip to content
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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ USAGE:
COMMANDS:
inspect print info about the layers of an image
ls ls prints the files of a layer
extract extract files from an image and print to stdout
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
Expand Down Expand Up @@ -89,6 +90,16 @@ Mode Size Name
-rwxrwxr-x 4.6 kB docker-entrypoint.d/30-tune-worker-processes.sh
```

Extract files from an image:

```sh
layer extract image.tar etc/nginx/nginx.conf # print to stdout
layer extract image.tar etc/nginx/nginx.conf --output_dir /tmp # write to /tmp/etc/nginx/nginx.conf
layer extract image.tar file1 file2 file3 # multiple files
```

Extract uses the topmost layer containing each file, matching container runtime behavior.

---

- See also https://github.com/wagoodman/dive.
Expand Down
Loading