In this docker article, we will be looking how to run a Jenkins docker container in Linux.
Following command is used to create a volume for Jenkins docker container.
docker run -d --name jenkins1 -p 8080:8080 -p 50000:50000 -v vol1:/var/jenkins_home jenkins
Lets see it in ubuntu linux shell example.
In above example, we run a Jenkins docker container. We mapped Jenkins 8080 port to our host Ubuntu OS 80 port, and Jenkins API port 50000 to our host Ubuntu OS port 50000. Further we attached a native docker volume we created as "vol1" to guest docker container jenkins_home folder. We finally check nmap and curl result about ports and html response.