How to integrate Jenkins Jobs with Docker containers?


I am working on integrating Jenkins build with Docker containers.

What do I have?

  • I have my local host machine, which is running Windows.
  • Inside this machine, I have installed LINUX VM.
  • In this VM I have 3 containers.
  • On my local jost machine, I have configured on host file the IP of the VM and server names for the containers, so I can be able to start them manually.

What I would like to do?

  • It is to set a job on Jenkins that will trigger or start up these containers. Currently, I can start them manually. I just need to include the CI job to automate this.

Where am I stuck?

  • Would it be possible from Jenkins Job to point & access my local host machine?
  • If the above is possible, how do I then configure the SSH from my local host machine to the VM so I can Pull and start-up containers?

Thanks in advance for recommendations,