# `dext` A 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] FLAGS: -h, --help Prints help information -e, --entrypoint Write entrypoint? OPTIONS: -f, --entry-file Entrypoint file name, relative to out_path [default: entrypoint.sh] -v, --version Docker image version [default: latest] ARGS: Docker image name Output folder ``` ## Installation ``` $ cargo install dext ``` ## Usage 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. ## Logging Debug logging can be enabled with the `RUST_LOG` environment variable. ``` $ RUST_LOG=dext=debug dext ... ```