Building and Pushing Docker Images in CI/CD

From Code to Container: Automate Docker Builds, Tagging, and Registry Pushes with GitHub Actions.

By Sandip Das · · 11 min read

Building and Pushing Docker Images in CI/CD
💡
Hey — It's Sandip Das 👋

We need to automate Docker builds and registry pushes so every model-serving code change produces a consistent, deployable container image.

Tagging images with Git commit SHAs makes releases traceable and helps teams reliably deploy or roll back to a known version.


📚 Key Learnings

  • What a CI image build looks like
  • GHCR or Docker Hub?
  • Tagging strategies that survive contact with production
  • iris-mlops: the build workflow

🧠 Learn here

On Day 23 you built the FastAPI serving image for iris-mlops on your machine, tagged it by hand, and pushed it to Docker Hub. It worked, and it is also exactly the kind of step that quietly breaks a team: the image on the cluster came from someone's laptop, built from whatever was in their working tree, tagged latest

Read the full article on learnxops.com.

Topics: 100 Days of MLOps, MLOps, ML, GitHub Actions