Docker Tagging Strategy
This document describes the Docker image tagging strategy used across Eventuras applications.
Overview
All applications follow a consistent tagging strategy optimized for:
- GitOps with Argo CD: Predictable tags for automated deployments
- Traceability: Easy correlation between images and commits
- Release management: Clean version tags for production
Tag Types
| Tag Pattern | Example | When Created | Purpose |
|---|---|---|---|
canary | losolio/eventuras:canary | Every push | Latest build from any branch |
main | losolio/eventuras:main | Push to main | Latest stable build for staging |
sha-<full-sha> | losolio/eventuras:sha-abc123... | Push to main | Immutable reference for releases |
main-YYYYMMDD-<sha> | losolio/eventuras:main-20260202-abc1234 | Push to main | Human-readable with date |
dev-pr<n>-<sha> | losolio/eventuras:dev-pr42-abc1234 | Pull requests | PR testing (not pushed) |
<version> | losolio/eventuras:2.27.1 | Release tag | Production releases |
Environment Mapping
┌─────────────┬────────────────┬─────────────────────────┐
│ Environment │ Image Tag │ Trigger │
├─────────────┼────────────────┼─────────────────────────┤
│ Development │ canary │ Any branch push │
│ Staging │ main │ Push to main branch │
│ Production │ <version> │ Git tag @app@x.y.z │
└─────────────┴────────────────┴─────────────────────────┘Argo CD Integration
Development Environment
Argo CD can watch the edge tag for development deployments:
# Argo CD Application values
image:
tag: edgeStaging Environment
Argo CD watches the canary tag for staging deployments:
# Argo CD Application values
image:
tag: canaryProduction Environment
Production uses explicit version tags created during releases:
# Argo CD Application values
image:
tag: "v2.27.1"Release Process
- Push to feature branch → Builds with
edge,edge-<sha>tags - Merge to main → Builds with
canary,main-<sha>tags - Create release tag (e.g.,
@eventuras/api@2.27.1) - Release workflow → Builds with
v2.27.1andlatesttags - Update Argo CD → Point production to new version tag
Applications Using This Strategy
| Application | Image | Workflow |
|---|---|---|
| API | losolio/eventuras | api-main.yml, api-release.yml |
| Web | losolio/eventuras-web | web-main.yml, web-release.yml |
| Idem IDP | losolio/idem-idp | idem-idp-main.yml |
Multi-Architecture Support
All images are built for multiple architectures:
linux/amd64(x86_64)linux/arm64(Apple Silicon, ARM servers)
Build Caching
GitHub Actions cache is used for faster builds:
cache-from: type=gha
cache-to: type=gha,mode=maxBest Practices
- Use
edgefor development - Latest feature branch build - Use
canaryfor staging - Latest main branch build - Use
v*for production - Explicit versioned releases - Use
latestonly for demo/quick-start - Points to latest stable release - Never use
latestin production - Always pin to a specific version - Use SHA tags for debugging -
edge-<sha>ormain-<sha>for exact builds