Docker Community Forums

Share and learn in the Docker community.

How to create a image or container using jenkins


(Devlogic123) #1

Hello,
I want to handle my docker which is on local host using Jenkins and Jenkins and docker are installed on my local server I want to create a build project in Jenkins to handle my local docker. Means run all the docker commands through Jenkins instead going to local server and putting the commands. Simply I want to create a automation task for docker to access it through Jenkins.

      How can I do that?

If any one did this before please share the steps I stuck over here…


(Sam) #2

well, you either create a script that jenkins runs which has all the docker commands,
OR you use the jenkins Docker plugin…https://wiki.jenkins.io/display/JENKINS/Docker+Plugin


(Devlogic123) #3

I didn’t get the Docker API url port, actually I didn’t use that -H option before run the docker and already pulled one image and created one container instance and jboss server is running on that container. So, is there any way in docker plugin to get access of docker without stopping it.

Basically, I didn’t enabled Docker Remote API on host machine…


(Sam) #4

where does the build run? and where is docker installed?

I would run them together… I have no experience with the jenkins plugin


(Devlogic123) #5

They running on same local server but has different service. Even I also don’t have any experience about this. This task is new for me.