Skip to content
Guest
Learn Docker · Course Syllabus Show lessons
Production Docker · 8 min read · Intermediate

Image Registries, Tagging & CI Builds

Tag images with Git commit SHAs and SemVer, push to GitHub Container Registry (GHCR), and build in CI.

What you'll learn

  • Tag images cleanly with registry/owner/repo:version
  • Push immutable commit-SHA tags for instant rollbacks
  • Automate image builds and pushes inside GitHub Actions

In production CI/CD, tag every built image with its Git commit SHA (ghcr.io/team/api:9482a50) or SemVer tag (v1.4.2). If a release has a bug, rolling back takes 5 seconds: just deploy the previous immutable tag!

Fill-in-the-Blank Exercise

Tag & Push to Registry

Build and push ghcr.io/myorg/api:1.0.0 to the container registry.

docker  -t ghcr.io/myorg/api:1.0.0 .
docker  ghcr.io/myorg/api:1.0.0

Live Tagging Script Lab

Bashtag_release.sh
Expected OutputClick “Run Live” to compile with GNU Bash
Building: ghcr.io/devpath/api:5298085
Pushing:  ghcr.io/devpath/api:5298085

Check Your Understanding

Score: 0 / 1

1. Why do production CI pipelines tag Docker images with the Git commit SHA?

Study Workspace

Finished this lesson?

Your progress is saved locally in your browser, no account needed.

Search courses, lessons, and references

Type to search across all courses, lessons, and quick references.

Press Esc to close Powered by Pagefind