Docker RegistryIntermediate
1Question 1 of 1
bashHow do Docker Registries and image tagging work?
Explanation & Concept
A Docker Registry (Docker Hub, AWS ECR, GitHub Container Registry) stores and distributes versioned container images.
Tags follow the format: `[registry_domain]/[namespace]/[repository]:[tag]`. Avoid relying exclusively on `:latest` in production; use specific semantic versions or Git commit SHAs.
Code Example
bash
# Tag image with semantic version and Git commit hash
docker tag my-app:latest ghcr.io/org/my-app:v1.2.0
docker tag my-app:latest ghcr.io/org/my-app:sha-a8f3b21
# Push to remote registry
docker push ghcr.io/org/my-app:v1.2.0How It Works & Key Takeaways
Pinning specific version tags guarantees immutable, reproducible deployments and prevents unexpected image drift.
Mock Test · 1 Questions · Optional
Ready for Health Checks?
Take a quick test to evaluate yourself, or move straight to the next module.
Intermediate1 questions