Docker Image Pusher v0.2.0
A high-performance command-line tool written in Rust for pushing Docker image tar packages directly to Docker registries. Version 0.2.2 represents a major architectural refactoring with modernized naming conventions, simplified module structure, and improved error handling.
π¨π³ δΈζζζ‘£
β¨ NEW in v0.2.0 - Architecture Improvements
ποΈ Modernized Architecture
- Unified Registry Pipeline: Consolidated upload/download operations into a single, efficient pipeline
- Simplified Module Structure: Removed redundant components and streamlined codebase
- Modern Error Handling: Renamed
PusherErrortoRegistryErrorfor better semantic clarity - Enhanced Logging: Renamed output system to
loggingfor clearer purpose
π§Ή Codebase Simplification
- Removed Legacy Code: Eliminated redundant upload and network modules
- Consolidated Operations: Single
UnifiedPipelinereplaces multiple specialized components - Cleaner Imports: Updated all module paths to reflect new structure
- Better Maintainability: Reduced complexity while maintaining all functionality
π§ Breaking Changes (v0.2.0)
- Module Restructuring:
/src/output/β/src/logging/ - Error Type Renaming:
PusherErrorβRegistryError - Component Consolidation: Unified pipeline architecture
- API Modernization: Cleaner, more intuitive function signatures
β¨ Core Features
- π High Performance: Streaming pipeline with priority-based scheduling
- π¦ Large Image Support: Optimized for large images with minimal memory usage
- π Enterprise Security: Comprehensive authentication support including token management
- π Multi-Registry: Compatible with Docker Hub, Harbor, AWS ECR, Google GCR, Azure ACR
- π Real-time Progress: Advanced progress tracking with detailed metrics
- π‘οΈ Intelligent Recovery: Smart retry mechanisms with exponential backoff
- βοΈ Advanced Configuration: Fine-tuned control over streaming, concurrency, and memory usage
- π Resume Support: Resume interrupted uploads with layer-level precision
- π― Dry Run Mode: Validate configurations and test connectivity
π― Use Cases
π’ Enterprise & Production Environments
- π Air-Gapped Deployments: Transfer massive ML models and applications to isolated networks
- π Security Compliance: Meet data sovereignty requirements with on-premises registries
- π Edge Computing: Deploy to remote locations with bandwidth constraints
- π CI/CD Pipelines: High-speed image transfers in automated deployment pipelines
- πΎ Disaster Recovery: Efficient backup of critical container images
π§ AI/ML & Big Data
- π€ Model Deployment: Push large PyTorch/TensorFlow models efficiently
- π Data Science: Transfer images with large datasets and dependencies
- π¬ Research Computing: Distribute complex computational environments
π₯ Installation
Option 1: Download Pre-built Binary
Download from GitHub Releases:
# Linux x64
# macOS Intel
# macOS Apple Silicon
# Windows (PowerShell)
Option 2: Install via Cargo
Option 3: Build from Source
# Binary will be at ./target/release/docker-image-pusher
π Quick Start
Basic Usage
Simple, straightforward image pushing:
# Basic push with authentication
Common Workflow
# 1. Export image from Docker
# 2. Push to private registry
Advanced Usage with Error Handling
# Production-ready command with comprehensive error handling
π Command Reference
Core Arguments
| Short | Long | Description | Required | Example |
|---|---|---|---|---|
-f |
--file |
Docker image tar file path | β | /path/to/image.tar |
-r |
--repository-url |
Full repository URL | β | https://registry.com/app:v1.0 |
-u |
--username |
Registry username | β οΈ | admin |
-p |
--password |
Registry password | β οΈ | secret123 |
Configuration Options
| Short | Long | Description | Default | Example |
|---|---|---|---|---|
-t |
--timeout |
Network timeout (seconds) | 7200 |
3600 |
--large-layer-threshold |
Large layer threshold (bytes) | 1073741824 |
2147483648 |
|
--max-concurrent |
Maximum concurrent uploads | 1 |
4 |
|
--retry-attempts |
Number of retry attempts | 3 |
5 |
Control Flags
| Long | Description | Usage |
|---|---|---|
--skip-tls |
Skip TLS certificate verification | For self-signed certificates |
--verbose |
Enable detailed output | Debugging and monitoring |
--quiet |
Suppress all output except errors | Automated scripts |
--dry-run |
Validate without uploading | Configuration testing |
--skip-existing |
Skip uploading layers that already exist | Resume interrupted uploads |
--force-upload |
Force upload even if layers exist | Overwrite existing layers |
ποΈ Advanced Examples
Large Image Optimization
# Optimized for large ML models (15GB PyTorch model)
Enterprise Harbor Registry
# Production deployment to Harbor with comprehensive error handling
Batch Processing Pipeline
#!/bin/bash
# High-throughput batch processing with v0.2.0 error handling
REGISTRY="https://enterprise-registry.internal/data-science"
MAX_CONCURRENT=4
FAILED_IMAGES=()
for; do
model_name=
if ; then
else
FAILED_IMAGES+=("")
fi
done
# Report batch results
if [; then
else
fi
Edge Computing Deployment (Bandwidth Constrained)
# Optimized for limited bandwidth environments
)
Multi-Architecture Deployment
# Deploy multi-arch images efficiently with v0.2.0 skip-existing optimization
for; do
done
π§ Advanced Configuration
Environment Variables
Configure defaults and credentials:
# Authentication
# Performance Configuration
# Behavior Configuration
# Simplified command with env vars
Performance Tuning Matrix
Network-Based Optimization
| Network Type | Max Concurrent | Timeout | Large Layer Threshold | Retry Attempts |
|---|---|---|---|---|
| Slow (< 10 Mbps) | 1 | 3600s | 512MB | 10 |
| Standard (10-100 Mbps) | 2-3 | 1800s | 1GB | 5 |
| Fast (100Mbps-1Gbps) | 4-6 | 600s | 2GB | 3 |
| Ultra-Fast (> 1Gbps) | 6+ | 300s | 4GB | 2 |
Image Size Optimization
| Image Size | Max Concurrent | Timeout | Large Layer Threshold | Recommended |
|---|---|---|---|---|
| < 1GB | 2 | 600s | 256MB | Standard settings |
| 1-5GB | 3 | 1800s | 512MB | Balanced performance |
| 5-20GB | 4 | 3600s | 1GB | High performance |
| > 20GB | 4-6 | 7200s | 2GB | Maximum optimization |
π Performance Benchmarks v0.2.0
π Troubleshooting
Common Issues and Solutions
Performance Optimization
# For slow upload speeds
Memory Usage Optimization
# For memory-constrained environments
Network Issues
# For unstable or high-latency networks
Certificate Issues
# For self-signed certificates
Debug and Validation
# Test configuration without uploading
|
Resume Interrupted Uploads
# Resume uploads that were previously interrupted
π Migration from v0.1.x
Full Backward Compatibility
v0.2.0 maintains 100% command-line compatibility. All existing scripts work without changes:
# This v0.1.x command works identically in v0.2.0
# Now uses improved v0.2.0 architecture with better error handling!
Internal Architecture Changes (No User Impact)
The v0.2.0 refactoring includes:
- Modernized Error Types:
PusherErrorβRegistryError(internal only) - Unified Pipeline: Consolidated upload/download operations
- Simplified Modules: Removed redundant components
- Enhanced Logging: Better structured logging system
Performance Improvements Available
# Take advantage of v0.2.0 performance optimizations
Enhanced Error Handling
# Benefit from improved error handling and retry logic
π€ Contributing
We welcome contributions! Please see our Contributing Guide for details.
π Version History
v0.2.0 (2025-01-XX) - Architecture Refactoring ποΈ
- BREAKING: Major module restructuring and naming improvements
- NEW: Unified pipeline architecture replacing redundant components
- NEW: Modern error handling with
RegistryErrortype - NEW: Enhanced logging system (renamed from output)
- REMOVED: Legacy upload/network modules and redundant components
- IMPROVED: Simplified codebase with better maintainability
- IMPROVED: Cleaner module structure and import paths
- COMPATIBILITY: Command-line interface remains fully compatible
- PERFORMANCE: Improved memory efficiency and error handling
Breaking Changes for Library Users:
PusherErrorβRegistryErrorcrate::output::βcrate::logging::- Removed legacy upload and network modules
- Simplified pipeline architecture
New Project Structure:
src/
βββ cli/ # Command line interface
βββ error/ # Unified error handling (RegistryError)
βββ image/ # Image parsing and caching
βββ logging/ # Logging system (renamed from output)
βββ registry/ # Unified registry operations
v0.1.4 (2025-06-07)
- Added support for modern Docker registry API features
- Improved error handling with clearer messages
- Enhanced compatibility with Harbor repositories
- Fixed authentication issues with private registries
- Updated dependencies to latest versions
- Performance optimizations for large image uploads
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Support
- π Documentation
- π Report Issues
- π¬ Discussions
- π§ Email: yorelog@gmail.com
π Acknowledgments
- Docker Registry HTTP API V2 specification
- Rust async ecosystem for enabling high-performance networking
- All contributors and users providing feedback
- Enterprise users who provided requirements for the v0.2.0 architecture
β οΈ Security Notice: Always use secure authentication methods in production. Consider using environment variables, credential files, or secure vaults instead of command-line arguments for sensitive information.
π v0.2.0 Architecture Tip: The new unified pipeline architecture provides better error handling and performance. Monitor the verbose output to understand upload progress and optimize settings for your environment.