Skip to main content

cli utility for copying container images to private ECR

Project description

ECReshore - Container Image Migration Tool

ECReshore is a CLI tool for copying container images to AWS ECR registries with intelligent multi-architecture support and batch processing capabilities.

Core Commands

copy - Copy Single Images

Copy container images to ECR with automatic multi-architecture detection.

Basic Usage:

# Copy with automatic repository inference
ecreshore copy nginx:latest

# Copy with custom target repository
ecreshore copy nginx:latest my-nginx-repo

# Copy with specific platforms
ecreshore copy nginx:latest --platforms linux/amd64,linux/arm64

# Copy all architectures
ecreshore copy nginx:latest -A

Key Features:

  • Smart repository inference - Automatically determines target repository name
  • Multi-architecture support - Preserves all platforms when Docker Buildx available
  • Skip-if-present - Automatically skips if target image already exists with matching content
  • Force override - Use --force to transfer even if target exists

scan - Kubernetes Cluster Scanning

Scan Kubernetes clusters to identify non-ECR container images.

Basic Usage:

# Scan current cluster and generate batch config
ecreshore scan --export batch-config.yaml

# Scan specific namespace
ecreshore scan -n production

# Scan all namespaces
ecreshore scan -A

# Generate report format
ecreshore scan --output report

Key Features:

  • Workload discovery - Scans Deployments, DaemonSets, StatefulSets, Jobs, CronJobs, Pods
  • ECR filtering - Only identifies non-ECR images that need migration
  • Batch config generation - Creates ready-to-use configuration files
  • Namespace targeting - Include/exclude specific namespaces

batch - Batch Processing

Execute multiple image transfers from YAML configuration files.

Basic Usage:

# Execute batch transfers
ecreshore batch config.yaml

# Preview without executing
ecreshore batch config.yaml --dry-run

# Force rich UI display
ecreshore batch config.yaml --rich

# Output structured logs
ecreshore batch config.yaml --output log

Configuration Format:

settings:
  concurrent_transfers: 3    # Parallel transfers
  retry_attempts: 3          # Retry attempts per transfer
  verify_digests: true       # Verify image integrity
  region: us-east-2         # AWS region

transfers:
  - source: nginx:latest
    target: my-nginx
    source_tag: latest
    target_tag: latest

Key Features:

  • Concurrent processing - Configurable parallel transfers (default: 3)
  • Progress tracking - Rich UI with real-time transfer status
  • Error handling - Automatic retries with configurable attempts
  • Skip detection - Automatically skips existing images with matching content

purge - Repository Cleanup

Remove images from ECR repositories with safety controls.

Basic Usage:

# Preview deletion for specific repository
ecreshore purge my-repo --dry-run

# Purge repository, keeping latest image
ecreshore purge my-repo --keep-latest

# Preview deletion for all repositories
ecreshore purge -A --dry-run

# Purge with pattern matching
ecreshore purge -A --filter my-app-* --keep-latest

Key Features:

  • Safety first - Always use --dry-run to preview deletions
  • Selective deletion - Target specific repositories or use patterns
  • Latest preservation - --keep-latest protects most recent images
  • Bulk operations - Process all repositories with filtering options

Common Workflow

  1. Discovery: Scan your cluster to identify images needing migration

    ecreshore scan --export migration-plan.yaml
    
  2. Preview: Review the generated configuration and preview the batch operation

    ecreshore batch migration-plan.yaml --dry-run
    
  3. Execute: Run the batch migration

    ecreshore batch migration-plan.yaml
    
  4. Cleanup: Optionally purge old/unused images

    ecreshore purge old-repo --dry-run
    ecreshore purge old-repo --keep-latest
    

Global Options

  • -v, --verbose - Increase verbosity (-v for INFO, -vv for DEBUG)
  • --region - AWS region (respects AWS_DEFAULT_REGION, AWS_REGION, ~/.aws/config)
  • --registry-id - AWS account ID for ECR registry
  • --simple/--rich - Force specific UI modes (auto-detected by default)

UI Modes

ECReshore automatically detects your terminal capabilities and chooses the best display mode:

  • Rich UI - Full-featured progress bars, colors, and real-time updates
  • Simple UI - Text-based progress suitable for basic terminals
  • Log output - Structured JSON logs for automation and monitoring

Use ecreshore terminal-info to see your terminal's detected capabilities.

Authentication

ECReshore uses your existing AWS credentials. Ensure you have:

  • AWS CLI configured (aws configure)
  • Appropriate ECR permissions (ecr:* or specific ECR actions)
  • Docker daemon running for image operations

Test authentication with:

ecreshore auth-test

For additional commands and advanced options, run ecreshore --help or ecreshore COMMAND --help.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ecreshore-1.0.2.tar.gz (212.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ecreshore-1.0.2-py3-none-any.whl (148.8 kB view details)

Uploaded Python 3

File details

Details for the file ecreshore-1.0.2.tar.gz.

File metadata

  • Download URL: ecreshore-1.0.2.tar.gz
  • Upload date:
  • Size: 212.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for ecreshore-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b099e4550e4e837359a528fdfa99f092c1428d69042f1d030cb184b044f7801d
MD5 5d24bbbd35be45bc7feb84aba4f266de
BLAKE2b-256 000a056202ff4471381e1c6b2d83971af4ab493e8a219d5e2f4b0d8c420e0842

See more details on using hashes here.

File details

Details for the file ecreshore-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: ecreshore-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 148.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for ecreshore-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d7a4d32496aa2f607d8e67884dc38e97a86c1974b3a738526b933010f503829c
MD5 6b9ac1697a2acd4ae622d3c88d6d4066
BLAKE2b-256 a5b4604b027d06887403eea330ef9163e2a85d38b2f0bfd59c29f2344389c621

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page