Building a Complete CI/CD Pipeline with Docker and GitHub Actions

작성자

카테고리:

← 피드로
DEV Community · Rahimah Sulayman · 2026-07-18 개발(SW)
Cover image for From Feature Branch to Container Registry: Building a Complete CI/CD Pipeline with Docker and GitHub Actions

Rahimah Sulayman

Building a Complete CI/CD Pipeline with Docker and GitHub Actions

Modern software delivery is about much more than writing code. Successful engineering teams rely on automation, collaboration, repeatable workflows, and reliable delivery pipelines to move software from development to deployment.

To strengthen my DevOps skills, I built a production-inspired CI/CD project that simulates the workflow used by modern engineering teams.

Rather than focusing on building a complex application, I focused on building a professional software delivery pipeline—from planning and development to automated container image publishing.

This project demonstrates:

  • Git workflow
  • Feature branch development
  • Pull Requests
  • Docker containerization
  • GitHub Actions automation
  • Continuous Integration (CI)
  • Continuous Delivery (CD)
  • GitHub Container Registry (GHCR)

Note: This article has been updated to include Continuous Delivery with GitHub Container Registry (GHCR), along with improvements made after the initial publication.

The complete project is available on GitHub:

Project Objectives

The objective was to simulate a realistic DevOps workflow that mirrors how software is developed, reviewed, automated, and delivered in production environments.

The completed project includes:

  • GitHub Issues for task tracking
  • Feature branch development
  • Pull Request-based collaboration
  • Docker containerization
  • GitHub Actions automation
  • Continuous Integration
  • Continuous Delivery
  • GitHub Container Registry (GHCR)
  • Comprehensive project documentation

Technology Stack

  • Git
  • GitHub
  • GitHub Actions
  • Docker
  • GitHub Container Registry (GHCR)
  • Nginx
  • Linux (WSL)
  • Visual Studio Code

Development Workflow

Every feature followed a structured Git workflow before reaching the main branch.

GitHub Issue
      │
      ▼
Feature Branch
      │
      ▼
Development
      │
      ▼
Commit
      │
      ▼
Push
      │
      ▼
Pull Request
      │
      ▼
GitHub Actions
      │
      ▼
Build Docker Image
      │
      ▼
Publish to GHCR
      │
      ▼
Continuous Delivery

Enter fullscreen mode Exit fullscreen mode

pr

CI/CD Architecture

👩‍💻 Developer


📁 GitHub Repository


🌿 Feature Branch


🔀 Pull Request


⚙️ GitHub Actions

├── Repository Validation
├── Docker Build
└── Push to GHCR


📦 GitHub Container Registry


🚀 Deployable Container Image

Continuous Delivery with GitHub Container Registry

The project initially implemented Continuous Integration by automatically validating the repository and building the Docker image.

To extend the workflow into Continuous Delivery, I enhanced the GitHub Actions pipeline to:

  • Authenticate with GitHub Container Registry (GHCR)
  • Tag Docker images using the GitHub Container Registry naming convention
  • Automatically publish Docker images after successful workflow execution

Every successful pipeline execution now produces a deployable Docker image stored in GitHub Container Registry, making the workflow suitable for downstream deployment environments.

cd

Containerizing the Application

The application is packaged inside a lightweight Docker container using Nginx.

FROM nginx:alpine

COPY index.html /usr/share/nginx/html/index.html

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]

Enter fullscreen mode Exit fullscreen mode

Containerization ensures the application behaves consistently regardless of where it runs.

containerizing

Automating CI/CD with GitHub Actions

Every push and pull request automatically triggers GitHub Actions.

The workflow performs the following tasks:

  • Validates the repository
  • Builds the Docker image
  • Authenticates with GitHub Container Registry
  • Publishes the Docker image to GHCR

This eliminates manual build steps while ensuring every change follows the same automated delivery process.

cicd

Debugging the Pipeline

One of the most valuable aspects of this project wasn’t creating the workflow—it was troubleshooting it.

After migrating the application from Python to an Nginx-based static website, the CI pipeline failed because it was still validating a Python file that no longer existed.

Instead of simply rerunning the workflow, I:

  • Investigated the workflow logs
  • Identified the obsolete validation step
  • Updated the workflow
  • Verified the fix by rerunning the pipeline

Watching the workflow transition from ❌ failed to ✅ successful reinforced an important DevOps lesson:

CI/CD pipelines evolve alongside the applications they support.

Lessons Learned

This project strengthened my practical understanding of:

  • Git workflows
  • Feature branch development
  • Pull Requests
  • Docker containerization
  • GitHub Actions
  • Continuous Integration
  • Continuous Delivery
  • GitHub Container Registry (GHCR)
  • Pipeline troubleshooting
  • Technical documentation

More importantly, it demonstrated that successful DevOps projects are built through continuous improvement, testing, and iteration.

Explore the Complete Project

The repository has continued to evolve beyond the initial publication of this article.

It now includes:

  • 📘 Professional README
  • 📝 Detailed implementation log
  • 📸 Step-by-step screenshots
  • 🐳 Dockerized Nginx application
  • ⚙️ GitHub Actions CI/CD workflow
  • 🚀 Continuous Delivery to GitHub Container Registry
  • 🏷️ Official v1.0.0 release
  • 📄 MIT License

Final Thoughts

What began as a simple Docker containerization exercise gradually evolved into a complete CI/CD implementation using GitHub Actions and GitHub Container Registry.

Beyond the technical outcome, this project strengthened my understanding of Git workflows, automation, pipeline troubleshooting, Docker, and technical documentation.

More importantly, it reinforced that DevOps is not just about writing automation scripts—it’s about designing reliable, repeatable engineering processes that enable teams to deliver software with confidence.

I hope this walkthrough helps anyone learning DevOps by showing what an end-to-end project looks like in practice.

Thank you for reading!

Happy learning! 🚀

If you found this project helpful, feel free to ⭐ the repository, share your thoughts, or connect with me here on Dev.to. Feedback and suggestions are always welcome!

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다