A async client for OCI compliant image registries and Docker Registry HTTP V2 protocol.
The [DockerRegistryClientV2
] provides functions to query Registry API and download blobs.
```rust use std::{path::Path, fs::File, io::Write}; use ociregistryclient::DockerRegistryClientV2;
async fn main() -> Result<(), Box
let manifest = client.manifest("library/ubuntu", "latest").await?;
println!("{:?}", manifest);
for layer in &manifest.layers {
let mut out_file = File::create(Path::new("/tmp/").join(&layer.digest))?;
let mut blob = client.blob("library/ubuntu", &layer.digest).await?;
while let Some(chunk) = blob.chunk().await? {
out_file.write_all(&chunk)?;
}
}
Ok(())
} ```
This project is licensed under the MIT License.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in oci-registry-client by you, shall be licensed as MIT, without any additional terms or conditions.