I got two servers, 1 Linux AMI with Jenkins and other Linux AMI with Docker running on AWS.I want to configure my Jenkins server with my docker server. How I can achieve that? Basically I want both the instances to communicate and then I will be using my Jenkins instance to create a pipeline and build the docker images and push it to Dockerhub, for which I will be using my docker instance
2
Answers
I think, sorry if I misunderstand, that you just want a Jenkins agent?
Perhaps the documentation on setting up a Jenkins Agent will help you, and has all the necessary steps clearly laid out.
One instance suffice for Jenkins installations(you must install Java and Docker on it beforehand). Here is example of my Docker inside Docker configuration,where we run containers on the host(read more in fantastic Bibin Wilson blog, docker-in-docker, to get clear picture of dind)
Dockerfile
docker-compose file
.env variables file