DEV Community

Syria-git
Syria-git

Posted on

DevOps Portfolio Project: Jenkins CI/CD Pipeline with Docker Dynamic Agents

A detailed walk-through of a portfolio-ready Jenkins CI/CD project using dynamic Docker build agents.
Check out the full project on GitHub:(https://github.com/Syria-git/jenkins-docker-dynamic-agent)

DevOps Portfolio Project: Jenkins CI/CD Pipeline with Docker Dynamic Agents

πŸ‘‰ GitHub Repository:
https://github.com/syria-git/jenkins-docker-dynamic-agent

πŸš€ Project Overview

This project demonstrates how to:

Build a dynamic Docker agent per Jenkins run

Run CI/CD pipelines using ephemeral infrastructure

Deploy a simple web application automatically

Keep the repository safe for public GitHub (no secrets, no hardcoded proxies)

The goal is not application complexity, but CI/CD correctness and DevOps mindset.

🧰 Tech Stack

Jenkins (Declarative Pipeline)

Docker (Dynamic Build Agents)

Ubuntu 22.04

HTML / CSS / JavaScript (sample app)

πŸ” CI/CD Workflow

The pipeline follows this flow:

GitHub β†’ Jenkins β†’ Docker Build Agent β†’ Deploy β†’ Cleanup

Each Jenkins run:

Builds a custom Docker image

Starts a temporary container

Deploys application files

Cleans up all resources automatically

This approach mirrors real enterprise CI/CD environments.

πŸ“Š Pipeline Diagram

(Diagram shows Jenkins creating a Docker-based agent per build, deploying the app, and cleaning up afterward.)

πŸ—‚ Repository Structure
.
β”œβ”€β”€ app/ # Web application files
β”œβ”€β”€ ci/ # Jenkinsfile & Dockerfile
β”œβ”€β”€ Makefile # Optional local automation
└── README.md

Clear separation between:

Application code

CI/CD configuration

Infrastructure logic

πŸ” Secure Proxy Handling (Enterprise Practice)

This project is intentionally designed to be public-repository safe.

❌ No proxy IPs
❌ No credentials
❌ No secrets in code

βœ… How it’s handled instead

Proxy variables are configured directly in Jenkins:

Job β†’ Configure β†’ Environment variables

Examples:

HTTP_PROXY

HTTPS_PROXY

These values are:

Injected at runtime

Managed outside the repository

Safe for enterprise and portfolio use

This is exactly how real production pipelines handle network restrictions.

🎯 Why This Project Matters

Many CI/CD demos:

Hardcode credentials

Use static agents

Ignore cleanup

This project focuses on:

Ephemeral infrastructure

Security-first design

Clean Git history

Interview-ready explanations.

Top comments (0)