Status
docker-extract
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
:
use docker_extract;
use Path;
Details
The following procedure describes what docker-extract
does:
- Run
docker save {image}:{tag} -o {tmp_dir}/image.tar
- Extract all layers from
${tmp_dir}/image.tar
to wanted result dir - Delete
${tmp_dir}
It follows, that docker-extract
needs access to docker
and that {image}:{tag}
is already pulled.