DEV Community

Cover image for Building a Complete CI/CD Pipeline with Docker and GitHub Actions
Rahimah Sulayman
Rahimah Sulayman

Posted on

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

Modern software delivery is about much more than writing code. It requires automation, collaboration, repeatability, and reliable deployment workflows.

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

Instead of focusing on a complex application, I focused on the engineering process itself:

  • Git workflow
  • Feature branches
  • Pull Requests
  • Docker containerization
  • GitHub Actions
  • Continuous Integration
  • Continuous Delivery

The complete project is available on GitHub:

👉 GitHub Repository:

https://github.com/rahimahisah17/cloud-devops-ci-cd-lab


Project Objectives

The goal was to simulate a real development lifecycle from planning through deployment.

The project includes:

  • GitHub Issues
  • Feature branch development
  • Pull Requests
  • Docker containerization
  • GitHub Actions automation
  • Continuous Integration
  • Continuous Delivery
  • Project documentation

Technology Stack

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

Project Workflow

The project followed a structured Git workflow.

GitHub Issue
      │
      ▼
Feature Branch
      │
      ▼
Development
      │
      ▼
Commit
      │
      ▼
Push
      │
      ▼
Pull Request
      │
      ▼
GitHub Actions
      │
      ▼
Docker Build
      │
      ▼
Continuous Delivery
Enter fullscreen mode Exit fullscreen mode

Containerizing the Application

The application was containerized using Docker and deployed with an Nginx container.

A lightweight Docker image keeps the application portable and reproducible across environments.

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

Automating CI/CD with GitHub Actions

Every push and pull request automatically triggers GitHub Actions.

The workflow:

  • validates the repository
  • builds the Docker image
  • authenticates with GitHub Container Registry (GHCR)
  • publishes the Docker image

This removes manual build steps and ensures every change follows the same automated process.


Debugging the Pipeline

One of the most valuable parts of this project wasn't writing the workflow—it was fixing it.

After migrating the application from Python to an Nginx-based static website, the CI pipeline failed because it was still trying to validate a deleted Python file.

Instead of simply rerunning the workflow, I investigated the logs, identified the obsolete validation step, removed it, and verified the pipeline again.

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

CI/CD pipelines are living systems that evolve alongside the application.


What I Learned

This project strengthened my understanding of:

  • Git workflows
  • Feature branching
  • Pull Requests
  • Docker containerization
  • GitHub Actions
  • Continuous Integration
  • Continuous Delivery
  • Pipeline troubleshooting
  • Technical documentation

Final Repository

The repository now includes:

  • Professional README
  • Complete implementation log
  • Organized screenshots
  • MIT License
  • GitHub topics
  • CI/CD workflow
  • Dockerized application

Conclusion

Building this project reinforced that DevOps is about creating reliable, repeatable engineering processes, not just writing automation scripts.

The combination of Git, Docker, GitHub Actions, and disciplined workflow management provides a strong foundation for building and delivering modern cloud-native applications.

Thank you for reading!

If you have suggestions or feedback, I'd love to hear them.

Happy learning! 🚀

Top comments (0)