oci-unpack

Crates.iooci-unpack
lib.rsoci-unpack
version0.1.0
sourcesrc
created_at2024-11-04 01:40:20.462387
updated_at2024-11-04 01:40:20.462387
descriptionDownload and unpack OCI images.
homepage
repositoryhttps://github.com/lab-tool/oci-unpack
max_upload_size
id1434459
size129,892
Ayose C. (ayosec)

documentation

https://docs.rs/oci-unpack

README

oci-unpack

oci-unpack is a Rust crate to download and unpack OCI images from a container registry.

The unpack process is running in a sandbox created with Landlock, so it only has access to the files beneath the target directory.

See the API documentation for more details.

Example

The repository includes an CLI program in the examples directory.

$ cargo run --quiet --release --example unpack -- alpine /tmp/alpine-unpack

Alternatives

  • skopeo can be used to download an OCI image from a registry.
  • umoci can be used to unpack the layers.

The following commands are equivalent to the process implemented in this crate:

$ skopeo copy docker://alpine oci:alpine-image:latest

$ umoci unpack --image alpine-image alpine-unpack
Commit count: 14

cargo fmt