#docker #registry


A simple crate to extract image info from a local docker registry

1 unstable release

Uses new Rust 2021

0.1.0 Nov 22, 2021

#10 in #registry


254 lines


crates.io build

A very simple reqwest based crate to gather image info from a private docker registry.

This crate provides a simple interface to retrieve all the images stored on a private registry, and retrieve the details per image as needed. To use it, add the following to your Cargo.toml:

aduana = "0.1"

An example:

use aduana::*;

pub async fn main() -> Result<(), AduanaError> {

    // Create an inspector instance pointing to your registry
    let inspector = AduanaInspector::new("http://localhost:5000");
    // Retrieve a list of images on the registry
    let images = inspector.images().await?;

    // Loop over the retrieved images
    for image in images {
        // For each tag of an image
        for tag in image.tags() {
            // Retrieve its details
            let details = image.details(tag).await?;
            println!("{:#?}", details);


Local Registry For Development and Testing

Create a certificate for development. I would recommend using mkcert.

To test things out, you can run a local docker registry as follows:

$ docker run -it --rm \
    -p 5000:5000 \
    -v "$(pwd)"/certs:/certs \
    -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/registry.crt \
    -e REGISTRY_HTTP_TLS_KEY=/certs/registry.key \

In a separate console, pull, retag, and push an image to your local test registry as follows:

$ docker pull alpine
$ docker tag alpine localhost:5000/alpine:latest
$ docker push localhost:5000/alpine:latest

For more info, see the docker docs.


For now this crate is only meant for use with a small local registry containing a limited set of images. It does not implement any filtering or pagination to collect all the tags each image has. Do not use it on very large repository you do not own as you will clobber it!


~170K SLoC