Image tag :latest used in production
Quick summary
Your production deployment uses the :latest tag — you cannot guarantee which image version is running.
Why this happens
The deployment configuration uses :latest instead of a specific version tag
A developer used :latest for convenience without considering reproducibility
The CI pipeline builds and pushes with :latest instead of a versioned tag
Minimal example
# docker-compose.yml (production)
services:
app:
image: myapp:latest # non-reproducible — could be any version# docker-compose.yml (production)
services:
app:
image: myapp:v1.2.3 # specific, immutable version
# or: myapp:${IMAGE_TAG} with IMAGE_TAG set in CIUsing a specific version tag (v1.2.3) ensures the exact same image is deployed every time, making deployments reproducible.
How to diagnose
Check the deployment configuration for :latest image tags
Review the CI pipeline's image tagging strategy
Verify that image tags in production deployments are immutable and versioned
How to fix
Replace :latest with a specific version tag, commit hash, or semantic version
Update the CI pipeline to tag images with the git commit hash or version number
Pin image tags in the deployment configuration and update them explicitly on new releases
How to prevent
Always use specific, immutable image tags in production — never :latest
Use semantic versioning or commit hashes for image tags and automate tagging in CI
Related Resources
Related Glossary
Related Lessons
- Deployment
Learn about image tagging.