0% found this document useful (0 votes)
20 views3 pages

Building A CI-CD Pipeline With JenkinsDockerGitHub

Uploaded by

gmundluru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

Building A CI-CD Pipeline With JenkinsDockerGitHub

Uploaded by

gmundluru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

➡️Building a CI/CD Pipeline with Jenkins, Docker, and GitHub

🌟 Objective
To create a Jenkins pipeline that automates the deployment of an Apache web server
containerized with Docker. The Dockerfile and project files are sourced directly from a GitHub
repository, ensuring seamless integration and version control.
➡️Key Achievements
1. Dockerized Apache Web Server
- Created a `Dockerfile` to configure and build a Docker image for the Apache server.
- The image exposes port 80 and is optimized for containerized deployment.

2. Integrated Jenkins with GitHub


- Configured the pipeline to clone the repository from GitHub dynamically during each run.
- Handled potential issues like pre-existing directories to maintain a clean workspace.

3. Automated CI/CD Pipeline


Built a Jenkins pipeline with the following stages:
- Clone Repository: Fetches the latest code from GitHub.
- Build Docker Image: Builds the Apache Docker image.
- Run Docker Container: Starts the container, mapping it to the appropriate host port.
- Check Container Status: Verifies the container is running successfully.

4. Resolved Real-World Challenges


- Port Conflicts: Encountered and fixed issues where port `8080` was already in use by
dynamically changing ports or stopping conflicting processes.
- Docker Permissions: Overcame permission issues by configuring user access to the Docker
daemon.
- Clean Workspace Management: Added cleanup steps to ensure smooth pipeline runs.

5. Improved Pipeline Robustness


- Introduced error handling for existing containers and added cleanup steps to prevent resource
conflicts.

➡️Technologies Used
- Jenkins: Orchestrated the entire CI/CD process.
- Docker: Built, deployed, and managed the Apache server container.
- GitHub: Centralized version control for the `Dockerfile` and project assets.
- Linux: Configured system-level permissions and resolved conflicts.
✅ Key Takeaways
This project underscored the importance of automation and robustness in DevOps pipelines. By
integrating Jenkins with Docker and GitHub, I learned how to build an end-to-end pipeline that is
efficient, scalable, and capable of handling real-world scenarios like permission issues and
resource conflicts.
Next Steps
➡️Looking forward to expanding this project by:
- Adding automated tests to the pipeline.
- Deploying the containerized application on Kubernetes.
- Monitoring and logging with tools like Prometheus and Grafana.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy