Status
docker-extract
is a rust library that extracts the filesystem from a docker image.
Here is an example to extract alpine:latest
to directory ./docker-fs
:
```rust
use docker_extract;
use std::path::Path;
fn main() { let image = "alpine"; let tag = "latest"; let todir = Path::new("./docker-fs"); dockerextract::extractimage(image, tag, &todir); } ```
The following procedure describes what docker-extract
does:
docker save {image}:{tag} -o {tmp_dir}/image.tar
${tmp_dir}/image.tar
to wanted result dir${tmp_dir}
It follows, that docker-extract
needs access to docker
and that {image}:{tag}
is already pulled.