[−][src]Function docker_extract::extract_image
pub fn extract_image(image: &str, tag: &str, to_dir: &Path) -> Result<()>
Extract filesystem of the given docker image ({image}:{tag}
) to the given path to_dir
.
Does not extract symlinks to absolute paths, as they will point to wrong references anyways.
Example:
use std::path::Path; use std::io; fn main() -> io::Result<()>{ let image = "alpine"; let tag = "3.11.3"; let to_dir = Path::new(dir_string.as_str()); docker_extract::extract_image(image, tag, &to_dir) }