Skip to main content

CI/CD Pipeline for NGINX on Docker — Phase 1: Architecture & Tools

·1 min read

by Frank Doka

Article

CI/CD Pipeline for NGINX on Docker — Phase 1: Architecture & Tools

Phase 1 defines the architecture and introduces the four tools that each own one layer of the pipeline.

CI/CD pipeline architecture: Terraform provisions EC2 infrastructure, Ansible configures the hosts, Docker packages NGINX, and Jenkins orchestrates the pipeline on every push.
The four-layer pipeline — Terraform, Ansible, Docker, and Jenkins.

The Stack

LayerToolResponsibility
PackagingDockerBundles NGINX + OpenSSL into a portable container image
InfrastructureTerraformProvisions EC2 instances, security groups, and key pairs as code
ConfigurationAnsibleInstalls Docker on EC2, pulls the image, runs the container
OrchestrationJenkinsTriggers the full pipeline on every Git push

Why These Tools

Each tool does one thing well and hands off to the next. Docker doesn't know about AWS. Terraform doesn't configure software. Ansible doesn't know when to run. Jenkins ties them together into a single automated flow — push code, get a running deployment.

What's Next

Phase 2 creates the Docker image: NGINX with a self-signed OpenSSL certificate, tested locally, and pushed to Docker Hub.

More articles

CI/CD Pipeline for NGINX on Docker — Phase 5: Automated Deployments with Jenkins

Jenkins orchestrates the full pipeline — Terraform provisioning, Ansible configuration, container deployment, and smoke testing on every Git push.

Read more

CI/CD Pipeline for NGINX on Docker — Phase 2: Creating the Docker Image

Writing the Dockerfile, bundling NGINX with a self-signed OpenSSL certificate, testing locally, and pushing to Docker Hub.

Read more