tagged: AWS, ECR, Codebuild
Thanks to Martin Lostak for making this photo available freely on unsplash 🎁
If you're using Codebuild and have integrated docker into your CI pipeline, you have probably run across this error before:
.
This is frustrating because your code is not responsible for this failure.
If you get this error, its probably because you are pulling the images from docker hub without first authenticating to Docker. The obvious fix for this is to create a docker account and login before you pull the images.
But notice that little word 'upgrading' in the error message above. Upgrading means money.
An alternative that a teammate proposed was pretty simple - cache the images you use in your builds inside of a container registry!
That way, you can pull it as many times as you want without hitting the unauthenticated docker threshold.