The true advantage of having Jenkins on Docker is when you have to quickly create multiple development and staging instances of your production Jenkins server. It's also very useful in redirecting the traffic to a secondary Jenkins server while you perform maintenance activities on the primary Jenkins server. While we will see these use cases later, let's first try to run Jenkins on Docker.
Before we begin, make sure you have the following things ready:
- We need a machine with at least 4 GB of RAM (the more the better) and a Multi-core processor.
- Depending on how you manage the infrastructure in your team, the machine could be an instance on a cloud platform (such as AWS, DigitalOcean, or any other cloud platform), a bare metal machine, or it could be a VM (on VMware vSphere or any other server virtualization software).
- The machines should have Ubuntu 16.04 or greater installed on it.
- Check for admin privileges; the installation might ask for an admin username...