← Back to trackModule: Packaging and Deployment

INTERMEDIATE · Medium · 55m

Docker build strategy and tagging

CI/CD: Starter to Shipping

Lesson notes

Goal

Build reproducible Docker images and tag them in a way that supports rollbacks.

Multi-stage builds (why)

  • smaller final image
  • faster builds
  • fewer runtime dependencies

Tagging strategy (simple and effective)

Use:

  • immutable tag: git sha
  • optional human tag: release version
  • optional moving tag: latest (careful)

Example:

docker build -t myapp:sha-<sha> .
docker tag myapp:sha-<sha> myrepo/myapp:sha-<sha>
docker push myrepo/myapp:sha-<sha>

Reproducibility rules

  • pin base image versions
  • use npm ci not npm install in CI
  • avoid downloading random binaries at runtime

Next Step

Deploy safely: canary/blue-green, health checks, and rollbacks.

View full outline

Outline

Use the outline to jump to any topic.

Track tools

Search lessons, continue where you left off, and track completion.

Modules

3

Lessons

6

Estimated Time

340m

Completion

0%

0/6 lessons

Your progress: 0%

Complete a lesson to increase progress

Outline

Open a lesson for full notes. Mark completed to update your progress.

Goal: Understand what CI/CD automates and how it reduces risk in shipping software. The delivery pipeline (simple) CI/CD is not a tool. It is a set of automated checks + repeatable steps. CI (Continuous Integration) Focu…

Goal: Build pipelines that developers trust: fast feedback and stable results. Key principles fail fast (lint/unit tests early) deterministic builds (pin versions) cache smart (dependencies) keep stages small and clear a…

Goal: Create a workflow that is secure, repeatable, and deploy ready. A clean workflow structure Keep CI separate from deploy if possible. Key things to get right least privilege permissions secrets from GitHub Secrets (…

Goal: Find root causes fast when CI/CD fails. Debug checklist 1. Which step failed? 2. Is it deterministic or flaky? 3. Did dependencies change? 4. Is the environment different from local? 5. Does it fail only on main? T…

Goal: Build reproducible Docker images and tag them in a way that supports rollbacks. Multi stage builds (why) smaller final image faster builds fewer runtime dependencies Tagging strategy (simple and effective) Use: imm…

Goal: Release changes without taking production down. Patterns Rolling Update instances gradually. Simple, but can still cause partial outages. Blue/Green Two environments: blue = current green = new Switch traffic when…