<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Jenkins Administration]]></title><description><![CDATA[Jenkins Administration]]></description><link>https://jenkins-servers.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Sep 2026 05:40:00 GMT</lastBuildDate><atom:link href="https://jenkins-servers.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to configure jenkins in a docker container]]></title><description><![CDATA[In this blog, I will explain step-by-step process how can we configure jenkins in a docker container and then running jobs inside conatiners. First of all, let us see why we need to do so ?
Configuring jenkins in a docker container has a number of be...]]></description><link>https://jenkins-servers.hashnode.dev/how-to-configure-jenkins-in-a-docker-container</link><guid isPermaLink="true">https://jenkins-servers.hashnode.dev/how-to-configure-jenkins-in-a-docker-container</guid><category><![CDATA[#dockerInDocker (DID)]]></category><category><![CDATA[Jenkins]]></category><category><![CDATA[Pipeline]]></category><category><![CDATA[software development]]></category><dc:creator><![CDATA[Huzaifa Jamal]]></dc:creator><pubDate>Thu, 17 Apr 2025 03:25:33 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1744860224600/0ad74d7e-1b61-428b-b5b6-6a1a12563202.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this blog, I will explain step-by-step process how can we configure jenkins in a docker container and then running jobs inside conatiners. First of all, let us see why we need to do so ?</p>
<p><strong>Configuring</strong> jenkins in a docker container has a number of benefits:<br />1️⃣ Docker container image can be easily pushed to docker hub which anyone can access and reuse.</p>
<p>2️⃣ Docker image can be pulled on any server which has docker installed on it.</p>
<p>3️⃣ Docker <strong><em>volumes</em></strong> helps in retaining jenkin server’s data like users,configurations,jobs etc.</p>
<p>4️⃣ We can use docker containers inside jenkins to launch containers for different job stages, thus helping in running different execution enviroment for each job.</p>
<p>Now, lets talk about the steps how we can easily launch jenkins server using a docker container.</p>
<p><strong>✅ Step 1 :</strong> First of all, install docker desktop on host machine. After installation, run the following command to verify that docker has been installed.</p>
<p>﹥ <strong>docker --version</strong></p>
<p>✅ <strong>Step 2:</strong> Now, run the following docker commands to get your jenkins container up and running. I will use some extra commands which will help in using docker containers inside jenkins for different jobs.</p>
<p>﹥ <strong>docker run -td --name jenkins-container -p 8080:8080 --user root --privileged -v jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock jenkins/jenkins:lts</strong></p>
<p>✅ <strong>Step 3:</strong> After the image has been pulled, you can list the running container and can see your jenkins server running on port 8080 of your host machine.</p>
<p>✅ <strong>Step 4:</strong> To get the initialAdminPassword, get access to your container by running</p>
<p>﹥ <strong>docker exec -it jenkins-container /bin/bash</strong></p>
<p>✅ <strong>Step 5:</strong> Open the file located at /var/jenkins_home/secrets/initialAdminPassword. This file contains your initialAdminPassword which will be reuqired only one time to make sure you are managing the server and you have the keyfile accessible to you.</p>
<p>That is it. Now you can easily setup your further configuration regarding your pipelines and source code.</p>
<p>Happy Learning : )</p>
]]></content:encoded></item></channel></rss>