Jenkins is an open-source automation server that enables developers to automate various stages of their software development process, including building, testing, and deploying applications.
Key Features:
- Continuous Integration (CI): Jenkins automates the build and test process, ensuring that code changes are validated quickly.
- Continuous Deployment (CD): Jenkins automates the deployment process, allowing for faster and more reliable releases.
- Extensive Plugin Ecosystem: Jenkins has a vast array of plugins that extend its functionality, including support for various programming languages, version control systems, and deployment platforms.
- User-Friendly Interface: Jenkins provides a web-based interface for easy configuration and monitoring of automation tasks.
Benefits:
- Faster Time-to-Market: Automate testing and deployment to release software faster.
- Improved Quality: Catch errors early in the development process.
- Reduced Manual Effort: Automate repetitive tasks, freeing up developers to focus on coding.
Common Use Cases:
- Automated Testing: Run unit tests, integration tests, and UI tests automatically.
- Deployment Automation: Automate deployment to production, staging, or testing environments.
- Continuous Monitoring: Monitor application performance and alert teams to issues.
1) Install Docker (If not already installed)
Check this article for this step
2) Download the docker image
docker pull jenkins/jenkins:2.426.2-lts-jdk17
3) Run the docker image
docker run -d -p 8080:8080 -p 50000:50000 --restart=on-failure -v jenkins_home:/var/jenkins_home jenkins/jenkins:2.426.2-lts-jdk17
This will store the workspace in /var/jenkins_home. All Jenkins data lives in there – including plugins and configuration. You will probably want to make that an explicit volume so you can manage it and attach to another container for upgrades.
This will automatically create a ‘jenkins_home’ docker volume on the host machine.
Docker volumes retain their content even when the container is stopped, started, or deleted.
Useful links