Skip to content

rthomas/dext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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] <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

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 ...

About

Extracts a docker image layers into a folder.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages