Skip to content

Commit a5a3ad3

Browse files
authored
Merge pull request #3 from stackb/update-readme
Update readme with extract command
2 parents f79b3e7 + 495b6e7 commit a5a3ad3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ USAGE:
1616
COMMANDS:
1717
inspect print info about the layers of an image
1818
ls ls prints the files of a layer
19+
extract extract files from an image and print to stdout
1920
help, h Shows a list of commands or help for one command
2021
2122
GLOBAL OPTIONS:
@@ -89,6 +90,16 @@ Mode Size Name
8990
-rwxrwxr-x 4.6 kB docker-entrypoint.d/30-tune-worker-processes.sh
9091
```
9192

93+
Extract files from an image:
94+
95+
```sh
96+
layer extract image.tar etc/nginx/nginx.conf # print to stdout
97+
layer extract image.tar etc/nginx/nginx.conf --output_dir /tmp # write to /tmp/etc/nginx/nginx.conf
98+
layer extract image.tar file1 file2 file3 # multiple files
99+
```
100+
101+
Extract uses the topmost layer containing each file, matching container runtime behavior.
102+
92103
---
93104

94105
- See also https://github.com/wagoodman/dive.

0 commit comments

Comments
 (0)