Calculate Docker container registry costs for ECR, GCR, ACR, or Docker Hub. Estimate storage and data transfer fees for your container images.
Container registries host your Docker images and are a critical piece of any CI/CD pipeline. Costs vary significantly between providers: AWS ECR, Google GCR (now Artifact Registry), Azure ACR, and Docker Hub each have different pricing models for storage and data transfer.
ECR charges $0.10/GB/month for storage and standard data transfer rates for pulls. GCR uses Cloud Storage pricing at roughly $0.026/GB for multi-regional storage. Docker Hub offers free public repositories but charges $5–$25/month for private repos with varying pull rate limits.
This calculator helps you estimate the monthly cost of hosting container images based on total storage used and images pulled. Use it to compare providers and optimize your container registry spending by setting lifecycle policies to clean up old images.
Integrating this calculation into monitoring and reporting workflows ensures that engineering decisions are grounded in real data rather than assumptions about system behavior. Precise measurement of this value supports informed infrastructure decisions and helps engineering teams optimize system architecture for both performance and cost efficiency.
Container image bloat is one of the most overlooked infrastructure costs. Without lifecycle policies, registries accumulate thousands of old image tags. Teams with active CI/CD pipelines can easily store 50–200 GB of images, costing $5–$20/month in storage alone plus significant data transfer charges for frequent pulls. Data-driven tracking enables evidence-based infrastructure decisions, reducing the risk of over-provisioning costs or under-provisioning that leads to performance bottlenecks.
Storage Cost = storage_GB × storage_rate_per_GB Transfer Cost = transfer_GB × transfer_rate_per_GB Total Monthly = Storage Cost + Transfer Cost
Result: $28.00/month
100 GB of stored images at ECR's $0.10/GB costs $10/month. 200 GB of data transfer (image pulls) at $0.09/GB costs $18/month. Total: $28/month. Setting up lifecycle policies to keep only the last 10 tags per repo could reduce storage by 50–80%.
ECR charges $0.10/GB/mo storage and standard AWS transfer rates. GCR (now Artifact Registry) charges $0.026/GB/mo for multi-regional storage but $0.12/GB for cross-region pulls. ACR Basic is $5/mo for 10 GB included; Premium is $100/mo with geo-replication. Docker Hub Personal is free; Team is $7/user/month.
The single biggest registry cost reduction comes from shrinking your images. Start with Alpine-based images (5 MB base vs 72 MB for Ubuntu). Use multi-stage builds to separate build tools from runtime. Strip debug symbols and unnecessary files. A well-optimized Node.js image can be under 50 MB versus 900 MB with a naive Dockerfile.
Both ECR and GCR support lifecycle policies that automatically delete images matching certain criteria: untagged images older than N days, images exceeding a count limit, or images matching specific tag patterns. Implementing a policy to keep only the last 10 tagged images per repository typically reduces storage by 70–90%.
AWS ECR charges $0.10/GB/month for private repositories. Public ECR is free for storage with 50 GB/month free transfer. Data transfer within the same region is free; cross-region and internet transfer follow standard AWS rates.
Docker Hub offers free unlimited public repositories and one free private repository. Paid plans ($5–$25/month) provide more private repos and higher pull rate limits. Free anonymous pulls are limited to 100 per 6 hours per IP address.
The most impactful strategies: implement lifecycle policies to delete old tags, use smaller base images (Alpine saves 100–200 MB per image), use VPC endpoints to avoid transfer fees, and consolidate multi-arch images with manifests instead of separate tags. Reviewing these factors periodically ensures your analysis stays current as conditions and requirements evolve over time.
A VPC endpoint (PrivateLink) allows your EC2 instances and EKS nodes to pull ECR images without going through the internet. This eliminates data transfer charges and improves security. The endpoint costs $0.01/hr plus $0.01/GB processed.
A typical Node.js app image is 100–300 MB; a Java app is 200–500 MB. With 50 tags per repo and 10 repos, you could have 50–250 GB. Multi-stage builds with Alpine bases can reduce this by 60–80%. Layer sharing further reduces unique storage.
For AWS workloads, ECR is usually better: no pull rate limits, VPC endpoint support, IAM-based auth, and free same-region transfer. Docker Hub is more portable and better for open-source projects. GCR/Artifact Registry is optimal for GKE clusters.