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.1.tar.gz (209.7 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.1-py3-none-any.whl (147.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ecreshore-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ed37594082e5a70a8f2a37511d31b5824ec7a8f3be971725eb5696aa41921daf
MD5 60fc3e89be735baf885f4baef4f6161e
BLAKE2b-256 e16b64bed8330af665ebb2de054cdc3f1715da5fe750bd36d5b31223b72a8251

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ecreshore-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 93192e5a2fd330f0c2a33e6941e1a0a95ed1f875341576654cb48f1f22529c44
MD5 3bf3714a2e099570eb4157902ad1e87f
BLAKE2b-256 f826ac15dec08edcbc01e4f9582fc98ca77b31626ba5c027124bf905581feefb

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