{"id":15020946,"url":"https://github.com/fishi0x01/docker-extract","last_synced_at":"2025-10-26T19:30:24.995Z","repository":{"id":57620643,"uuid":"240760955","full_name":"fishi0x01/docker-extract","owner":"fishi0x01","description":"A rust library to extract the filesystem from a docker image","archived":false,"fork":false,"pushed_at":"2020-03-14T09:14:34.000Z","size":13,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T22:24:55.028Z","etag":null,"topics":["docker-extract","docker-image","filesystem","rust-library"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/docker_extract","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fishi0x01.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-15T17:47:43.000Z","updated_at":"2024-01-03T05:11:44.000Z","dependencies_parsed_at":"2022-09-02T17:33:59.291Z","dependency_job_id":null,"html_url":"https://github.com/fishi0x01/docker-extract","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishi0x01%2Fdocker-extract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishi0x01%2Fdocker-extract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishi0x01%2Fdocker-extract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishi0x01%2Fdocker-extract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fishi0x01","download_url":"https://codeload.github.com/fishi0x01/docker-extract/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238386160,"owners_count":19463310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-extract","docker-image","filesystem","rust-library"],"created_at":"2024-09-24T19:55:55.391Z","updated_at":"2025-10-26T19:30:19.682Z","avatar_url":"https://github.com/fishi0x01.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Status**\n\n[![CircleCI](https://circleci.com/gh/fishi0x01/docker-extract.svg?style=svg)](https://circleci.com/gh/fishi0x01/docker-extract)\n[![crates.io badge](https://img.shields.io/crates/v/docker_extract.svg)](https://crates.io/crates/docker_extract)\n[![docs.rs badge](https://docs.rs/docker_extract/badge.svg)](https://docs.rs/docker_extract)\n\n# docker-extract\n\n`docker-extract` is a rust library that extracts the filesystem from a docker image. \n\nHere is an example to extract `alpine:latest` to directory `./docker-fs`:\n```rust\nuse docker_extract;\nuse std::path::Path;\n\nfn main() {\n    let image = \"alpine\";\n    let tag = \"latest\";\n    let to_dir = Path::new(\"./docker-fs\");\n    docker_extract::extract_image(image, tag, \u0026to_dir);\n}\n```\n\n## Security\n\nThis library relies on the [tar crate](https://github.com/alexcrichton/tar-rs), which is very conscious about security concerns. \nTo prevent directory traversal issues, it will not unpack anything outside the specified output directory, i.e., paths with `..` in their name will not be unpacked.\n\nFurther, `docker-extract` does not extract symlinks to absolute paths, as they will point to wrong references anyways.\n\n## Detailed extraction procedure\n\nThe following procedure describes what `docker-extract` does:\n\n1. Run `docker save {image}:{tag} -o {tmp_dir}/image.tar`\n2. Extract all layers from `${tmp_dir}/image.tar` to wanted result dir\n3. Delete `${tmp_dir}`\n\nIt follows, that `docker-extract` needs access to `docker` and that `{image}:{tag}` is already pulled.\n\n## crev\n\nThis crate has its author's [crev review](https://github.com/fishi0x01/crev-proofs).\n\nIt is recommended to always use [cargo-crev](https://github.com/crev-dev/cargo-crev)\nto verify the trustworthiness of each of your dependencies, including this one.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishi0x01%2Fdocker-extract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffishi0x01%2Fdocker-extract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishi0x01%2Fdocker-extract/lists"}