| Crates.io | dext |
| lib.rs | dext |
| version | 0.1.3 |
| created_at | 2022-11-01 09:19:17.358801+00 |
| updated_at | 2022-11-02 23:48:07.575236+00 |
| description | A CLI tool to extract and unpack the layers of a docker image. |
| homepage | |
| repository | https://github.com/rthomas/docker_extract |
| max_upload_size | |
| id | 702732 |
| size | 74,238 |
dextA CLI tool to extract the layers of a local docker image and overlay the contents of them into a specified folder.
Extracts a docker image's layers to a specified location.
USAGE:
dext [FLAGS] [OPTIONS] <image-name> <out-path>
FLAGS:
-h, --help Prints help information
-e, --entrypoint Write entrypoint?
OPTIONS:
-f, --entry-file <entrypoint> Entrypoint file name, relative to out_path [default: entrypoint.sh]
-v, --version <image-version> Docker image version [default: latest]
ARGS:
<image-name> Docker image name
<out-path> Output folder
$ cargo install dext
To write out the contents of the rust image:
$ docker pull rust
...
$ mkdir rust_image
$ dext rust rust_image
To write the contents of an image (image), including a script to invoke it:
$ mkdir my_image
$ dext -e image my_image
This will create the file my_image/entrypoint.sh that when invoked with my_image as root (e.g. in a VM or chroot environment) will invoke the image entrypoint.
Debug logging can be enabled with the RUST_LOG environment variable.
$ RUST_LOG=dext=debug dext ...