Crate docker_image_pusher

Source
Expand description

Docker Image Pusher

docker-image-pusher is a command-line tool and library for pushing Docker image tar packages directly to Docker registries (including Docker Hub, Harbor, and private registries) with advanced chunked upload support, robust digest validation, and detailed error reporting.

§Features

  • Direct push of Docker/Podman image tarballs: No need to load images into a local daemon.
  • Chunked and parallel upload: Efficiently uploads large layers with retry and progress tracking.
  • Digest validation: Ensures layer and config digests match Docker/OCI standards.
  • Flexible authentication: Supports username/password and token-based auth.
  • Comprehensive error handling: Clear error messages for network, registry, and file issues.
  • Verbose and quiet modes: Control output for CI or debugging.

§Main Modules

  • cli - Command-line interface and argument parsing.
  • config - Configuration and authentication structures.
  • digest - Digest calculation and validation utilities.
  • error - Error types and handlers.
  • image - Image tarball parsing and metadata extraction.
  • output - Structured output and logging.
  • registry - Registry client and authentication.
  • tar_utils - Tarball extraction and layer handling.
  • upload - Upload strategies and progress tracking.

§Example Usage

docker save myimage:latest -o myimage.tar
docker-image-pusher --file myimage.tar --repository-url https://my-registry.com/myimage:latest --username user --password pass

§Library Usage

This crate can also be used as a library for custom workflows. See the documentation for each module for details.

Re-exports§

pub use config::AuthConfig;
pub use digest::DigestUtils;
pub use error::PusherError;
pub use error::Result;
pub use output::OutputManager;

Modules§

cli
Command line interface module
config
Configuration structures and utilities
digest
SHA256 digest utilities for Docker image processing
error
Error handling for the docker image pusher
image
Docker image handling module
output
Enhanced output control module with structured logging
registry
Registry module for Docker registry interactions
tar_utils
Shared tar processing utilities to eliminate duplication
upload
Upload module for handling chunked uploads and progress tracking

Macros§

with_context
Macro for standardizing error context