cr.root.io. Once configured, your workloads pull Root images from your own ECR — reducing external network dependency, enabling lifecycle policies, and keeping image access within your AWS account.
What You’ll Achieve
- Store
cr.root.ioimages in your AWS account’s ECR - Reduce repeated external pulls with local caching
- Handle mutable tags (
:latest,:prod) with automatic change detection - Optionally pin to specific architectures (e.g.,
linux/amd64)
Prerequisites
- AWS account ID and target region
- Root registry credentials (
cr.root.io) - A scheduler to run the mirroring job (cron, CI system, or Kubernetes CronJob)
- Docker installed on the machine running the mirror script
Step 1: Authenticate to AWS
Choose one method:Step 2: Choose Your ECR Naming Convention
Map Root image paths to ECR repository names. A consistent prefix keeps things organized:| Source | Destination |
|---|---|
cr.root.io/python:3.12 | <ACCOUNT>.dkr.ecr.<REGION>.amazonaws.com/root-mirror/python:3.12 |
cr.root.io/node:20-slim | <ACCOUNT>.dkr.ecr.<REGION>.amazonaws.com/root-mirror/node:20-slim |
Step 3: Create ECR Repositories
AUTO_CREATE_REPOS=true in the mirror script to create repositories automatically (requires additional IAM permissions).
Step 4: IAM Permissions
Your IAM role or user needs:AUTO_CREATE_REPOS=true, also add ecr:CreateRepository and ecr:DescribeRepositories.
Step 5: Define Images to Mirror
Createimages.txt. Each line specifies an image and optional architecture:
Step 6: Run the Mirror Script
Set environment variables and run:- Resolves the source config digest from
cr.root.io - Resolves the destination config digest from ECR
- Skips images where digests match (already cached and current)
- Pulls, retags, and pushes only when the image has changed
Step 7: Update Workload References
Step 8: Schedule the Mirror Job
Run the script regularly to pick up new Root Patches:images.txt into a container image and schedule it.
For frequently-changing production tags, run every 15–30 minutes. For pinned versions, less often.
Networking
For workloads in private subnets, configure an ECR VPC endpoint to keep pulls entirely within your AWS network:Troubleshooting
| Issue | Solution |
|---|---|
401 from cr.root.io | Verify ROOT_PASS token hasn’t expired |
Access Denied pushing to ECR | Check IAM permissions include ecr:PutImage and upload permissions |
| Repository not found | Pre-create repos or set AUTO_CREATE_REPOS=true |
| Wrong architecture pulled | Add architecture column (amd64/arm64) to images.txt |
| Slow initial pulls | First pull fetches from Root; subsequent pulls serve from ECR cache |