How do you secure `docker login` on CI runners?
IntermediateProductionRegistries, Tagging & Supply Chain
Answer
Use OIDC-issued short-lived credentials (aws-actions/amazon-ecr-login, GitHub's GITHUB_TOKEN for GHCR), --password-stdin, a per-job DOCKER_CONFIG temp directory, and docker logout in a cleanup step on shared runners. Avoid long-lived tokens in repo secrets and never echo them. Credential helpers beat plaintext config.json.
More on Registries, Tagging & Supply Chain
What is a good image tagging strategy for production?BeginnerWhy is deploying by digest better than by tag?IntermediateHow do you enable immutable tags and lifecycle rules in ECR?IntermediateHow does ECR handle scanning and replication?IntermediateHow do you give an EKS node or CI job access to ECR with least privilege?IntermediateDocker Hub vs ECR vs GHCR vs Harbor: how do you choose?Intermediate