Interview Prep/Docker/Registry, pull and push errors

ECR: `denied: Your authorization token has expired. Reauthenticate and try again.`

BeginnerTroubleshootingRegistry, pull and push errors
Answer

Likely causes → ECR tokens last 12 hours.

Diagnose → Check when you logged in.

Fix →

aws ecr get-login-password --region ap-south-1 | \
  docker login --username AWS --password-stdin 123456789012.dkr.ecr.ap-south-1.amazonaws.com

Prevent → Use amazon-ecr-credential-helper or log in at the start of each job.

All Docker questions Roadmap: Docker & containers

More on Registry, pull and push errors