How to create a image or container using jenkins

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…

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

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…

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

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

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.