iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Do you want to set up a Jenkins server but avoid the pain of manual installation? You can achieve this by installing Jenkins on Ubuntu using the Jenkins Docker container!
This is a hands-on walkthrough of the steps to install Docker, start a Jenkins container, open port 8080, and complete the initial Jenkins configuration.
Let’s do this!
Step 1: Install Docker on the Ubuntu Server

The beauty of running apps as containers is that you do not need to install too much software. If you’re containerizing with Docker, all you need to install is Docker!
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Follow these steps to complete the first task of setting up Jenkins on an Ubuntu server with the official Jenkins Docker Container:
#1 Best Overall
- Save valuable floor space: 6U wall mount server cabinet Dimensions: 13.78" H x21.65" W x17.72" D.Maximum mounting depth is 14.2"
- Keep critical network equipment secure: glass door and side panels are lockable to prevent unauthorized access. Front door can be installed on either side of the front of the cabinet to satisfy your door swing orientation preference
- Easy equipment configuration: Fully adjustable mounting rails and numbered U positions, with square holes for easy equipment mounting with top and bottom punch-out panels for easy cable access
- Durability: Made of high quality cold rolled steel holds up to 110lb (50kg) (Easy Assembly Required)
- PCI & HIPPA and EIA/ECA-310-E compliant
- As a standard practice, always update the app manager by running the “apt update”
sudo apt update
- After updating the Ubuntu app manage, execute “docker” to get the command you need to install the app.

I will run the command below (highlighted in the above screenshot) – to install Docker on my Ubuntu server;
sudo apt install docker.io
When you execute the command, you will be prompted to enter the root password. If you’re new to Linux and wondering why; it is because of the use of “sudo” in the command.
Moving on, after entering the root password, the installer will prompt you to confirm the installation. Type “Y” and press enter.

Wait for Docker to install, then proceed to step 2 below. Before you proceed, confirm that Docker is now installed by executing the “docker” command.

Since Docker is now installed, it displays information containing some details about the command.

Step 2: Start the Jenkins Container with a Docker Volume

After installing Docker on your Ubuntu Server, the next step to configuring Jenkins is to start the Jenkins container with a Docker Volume.
To start a Jenkins container on your Ubuntu Server using its official Docker image, execute the command below:
Free tools Windows power users keep installed
One-click scans. No signup required.
sudo docker run -p 8080:8080 -p 50000:50000 -d \ -v jenkins_home:/var/jenkins_home \ -v /var/run/docker.sock:/var/run/docker.sock \ jenkins/jenkins:lts
Here are the explanations of the command and its parameters:
docker run – this is the Docker command you use to start a Docker container from an image
-p 8080:8080 – the “-p” switch is used to map the port the app’s container is running on to the host’s port. In this example, the first port 8080 represents the port on the host (my Ubuntu server).
Likewise, the second port 8080 is the container’s app. Notably, to access Jenkins via a browser, you use port 8080.
Recommended Free Tools
So, -p 8080:8080 means “map the container’s port 8080 to the host’s port 8080.” Note that the two ports do not have to be the same.
For example, if port 8080 was not available on my host, I could have used -p 8081:8080 – this would map the Jenkins port 8080 to the host’s port 8081.
-p 50000:50000 – this switch is optional but I included it for completeness. However, in production environments, this may be required, and here is why:
If you need a Jenkins server for a large workload, you may need to configure Jenkins clusters.
Port 50000 is the port where the master and worker Jenkins nodes communicate. So, it is essential to map the port to the host as well.
-d – this switch makes Docker run the Jenkins container in “detached” mode. This means that the Jenkins container process runs in the background.
Rank #2
- Universal 19” Rack Mount Compatibility – Perfect for pro audio, video, IT, and network gear. Compatible with mixers, routers, patch panels, servers, power amps, and more.
- Heavy-Duty Load Capacity – Built to support up to 550 lbs. Ideal for studio gear, DJ setups, server equipment, and AV components that demand serious stability.
- Robust Steel Frame & Design – Made with 1.5mm thick steel and weighs 36 lbs for maximum durability, reduced vibration, and long-term reliability in any setting.
- Mobile & Secure – Preinstalled with 3” industrial-grade caster wheels (lockable), making it easy to move and position your rack exactly where you need it.
- All-In-One Setup Kit Included – Comes with 34 rack screws (5mm & 6mm), a 1U blank spacer, and an assembly tool—ready for fast installation out of the box.
Setting up the Jenkins Docker container this way in an Ubuntu server – or any OS – allows you to close the terminal without stopping the container’s process.
-v jenkins_home:/var/jenkins_home – you guessed it, the “-v” stands for volume! Earlier, I explained that to persist data on the Jenkins container, you must add a Docker volume.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11“jenkins_home” is the name of the Docker volume that the data on the container is synched – more on this later. However, the “/var/jenkins_home” is the path a Jenkins Docker container saves data.
By specifying “-v jenkins_home:/var/jenkins_home,” I’m asking Docker to create a Volume on my Ubuntu server and sync the container’s data on the path /var/jenkins_home to the same path on the host.
-v /var/run/docker.sock:/var/run/docker.sock – this line of code mounts the path to the Docker binaries on the host server (where we already installed Docker) to the Jenkins container.
This is a very easy way to make Docker available on the container without needing to install it.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →jenkins/jenkins:lts – this is the name of the Jenkins Docker image. The first part (before the “:”) is the image name.
Meanwhile, the second part (“lts”) is the “tag” or version of the image you want to use. You can learn more about available tags on the Jenkins official Docker hub page.
Now that you understand the parameters of the command that installs Jenkins on Ubuntu by starting its Docker container, let’s run the command.
The command pulls the image in “Layers” from the Docker Hub – then, it starts the Jenkins container.

Before proceeding to the next step, let’s run some commands that give us information about the Jenkins container, starting with “docker ps”:
sudo docker ps
The ‘docker ps’ command confirms that the Jenkins container started successfully.

There are multiple of information about the container, but I like to highlight the ports. The ports “0.0.0.0:8080->8080/tcp, :::8080->8080/tcp” – the first is IPv4, while the second is IPv6 – indicates that the host’s port 8080 is mapped to the same port on the container.
Similarly, the values “0.0.0.0:50000->50000/tcp and :::50000->50000/tcp” are port mappings for Jenkins master and worker nodes.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Having reviewed the results of the “docker ps” command, let’s look at another important command that provides information about the Docker volume:
sudo docker volume inspect jenkins_home
The command displays useful information about the Docker volume, jenkins_home created when we started the Jenkins container. By the way, this type of Docker Volume is called a “Named” volume.
Back to the result of the last command, here is the screenshot.
Rank #3
- ADJUSTABLE DEPTH: 4- Post 22U 19" server rack enclosure with 4 vertical rails and adjustable mounting depth 5.7" to 33.0" (14,4cm to 83,8cm); IT rack is compatible with various servers / switches / data / video / AV and other IT networking equipment
- EASY SHIPPING AND ASSEMBLY: Enclosed 22U data rack cabinet ships compact flat-packed to avoid damage and facilitate installation; Include wheels & levelling feet to offer more stability; Home server rack cabinet is only 46.6in (118,3cm) in height
- DESIGN AND VENTILATION: Half height server rack cabinet has lockable and removable door and side panels with vented top allowing airflow; 4 Post 19" rack with 1764lb (800kg) weight capacity (stationary); Computer cabinet rack is EIA/ECA-310-E Compliant
- HARDWARE INCLUDED: Rolling home network rack includes rack mounting and equipment mounting hardware, such as 20 M6 cage nuts / screws, PVC cup washers; Front/rear doors and side panels Keys, 2x allen keys; Rack assembly hardware; Casters and leveling feet
- THE IT PRO'S CHOICE: Designed and built for IT Professionals, this 22U IT Server Cabinet is backed for life, including free lifetime 24/5 multi-lingual technical assistance

I have highlighted the “Mountpoint” because this is where the Jenkins data is stored on the Ubuntu server (the container host). To display the information in the path, let’s run the “ls” command.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemssudo ls /var/lib/docker/volumes/jenkins_home/_data
The command displays multiple files and directories but for now, I will like you to the “secrets” directory. This is because this folder has the initial password we need to sign in to Jenkins – more on this later.

Step 3: Confirm that Port 8080 is Open on the Ubuntu Server

So far, we’ve covered two steps in deploying Jenkins on Ubuntu with the Jenkins Docker container.
In the process, we already established that Jenkins is available on port 8080. So, since Jenkins is on this port, we should be able to access it by entering “server IP address:8080” on the browser.
Before we do that though, let’s confirm that port 8080 is open on the server. First, from your computer, run the telnet command:
telnet 192.168.0.96 8080

Another method to check that port 8080 is open is to view the app using the port on the Ubuntu server. To display this information, run the command below on your Ubuntu server:
sudo netstat -tulpn | grep :8080
The command confirms that our Jenkins Docker container is listening on port 8080 for IPV4 and IPV6 for all incoming connections.

Step 4: Complete the Initial Jenkins Configuration

Now that we have established that port 8080 is open on the Ubuntu server, it is time for the final step – completing the initial Jenkins configuration.
Follow the steps below to conclude the final stage of installing Jenkins on Ubuntu:
Enter the IP address of the Ubuntu server, followed by “:8080” on the browser. In my example, the IP address of my Ubuntu server is 192.168.0.96, I’ll enter:
192.168.0.96:8080
And, boom, Jenkins is up! Well, not quiet.

The first page of the Jenkins configuration requires us to enter an Administrator password. Before you panic, Jenkins provided the path this password is saved – see the highlighted portion of my screenshot above.
If you recollect, I touched on this in step 2 when I discussed this command.
sudo ls /var/lib/docker/volumes/jenkins_home/_data
Wait a minute, but the path in the above command is different from the path in the initial Jenkins configuration page shown earlier!
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Yes, it is.
The path – /var/lib/docker/volumes/jenkins_home/_data – is the path the Docker volume on the Ubuntu server is mounted. However, /var/jenkins_home/ is the Jenkins directory on the container.
We can get our initial Jenkins administrator password from both paths, but for this guide, I’ll get the password from the volume mount point – /var/lib/docker/volumes/jenkins_home/_data.
So, let’s review the output of this command, once again:
sudo ls /var/lib/docker/volumes/jenkins_home/_data
As I mentioned earlier, the _data directory has a directory called “secrets.”
Recommended Free Tools
Rank #4
- DURABLE BUILD: Constructed from high-quality Cold Rolled Steel, the NavePoint Consumer Series 12U network cabinet boasts a sturdy, welded frame. Fitting EIA standard 19” networking equipment, this server cabinet confidently supports up to 110 lbs, providing a resilient base for your vital IT gear and equipment
- CONVENIENT DESIGN: This 12U cabinet features a reinforced, heat-treated, tempered glass front door with a security lock. Perfect for applications requiring both security and accessibility, its compact design of 17.72"L x 21.65"W x 24.42"H offers a practical solution for space-constrained settings.
- EASY & CUSTOMIZABLE EQUIPMENT SET UP - The 12U IT cabinet, with removable side panels and security locks, offers customization at its finest. Whether it's for an efficient device or cable management, this data cabinet ensures secure, adaptable configurations that suit your networking server requirements
- ENHANCED VENTILATION & SECURITY - Built-in fans and flow-through ventilation work to prevent overheating, ensuring optimal operation of your equipment. The reinforced, lockable tempered glass front door not only boosts security but also facilitates easy monitoring of installed equipment.
- SAFETY & COMPLIANCE - All NavePoint products are built to industry standards.

This is the same “secrets” directory in the Jenkins configuration page.

Anyway, to retrieve the administrator password, use the cat command below:
sudo cat /var/lib/docker/volumes/jenkins_home/_data/secrets/initialAdminPassword
And there is your administrator password. Copy the password and paste it on the “Administrator password” field of the Jenkins “Getting Started.”

After you enter the password, click “Continue” to proceed with the initial Jenkins server setup.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minute
On the next page, select the default, “Install suggested plugins.” Then, wait for Jenkins to install the plugins.


After that, create the first Jenkins administrator.

Finally, confirm the Jenkins server URL and port and finish the initial setup.



I hope that by following this guide you set up Jenkins on Ubuntu with a Docker Container successfully! If you did or have any questions, let us know with the comments form towards the end of this page.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Step 5: Make Docker Command Available on the Jenkins Container

When I mounted the Jenkins container in step 2, I explained that this line – “-v /var/run/docker.sock:/var/run/docker.sock” – of the code mounted the path to the Docker binaries on the host to the same path on the Jenkins container.
However, to make Docker commands available on the container, there are some final tasks we need to perform.
To confirm that Docker commands are not available on the container, let’s sign in to the container as the normal jenkins user. This is done using the “docker exec” command.
However, since you require the container’s ID, run the “docker ps” command first to get it.
sudo docker ps

Now, log in to the container and run the “docker” command

Now that we have confirmed that docker is not available on the Jenkins container, let’s fix that problem with these steps:
- Exit the container as the jenkins user and sign in as root with this command
sudo docker exec -u 0 -it bd3c208d8633 bash
- After signing in as root, execute this command:
curl https://get.docker.com/ > dockerinstall && chmod 777 dockerinstall && ./dockerinstall
The curl command fetches the latest version of Docker from the official site, https://get.docker.com, and saves it in the dockerinstall folder. Then, the chmod command sets the correct permission on the folder.
Finally, “./dockerinstall” command installs Docker on the container. Execute the command, wait for it to complete, and proceed to step 3.
- Grant everyone “rw” permission to the /var/run/docker.sock file. Before you run the command below, execute “ls -l /var/run/docker.sock” – to see the current permission.
chmod 666 /var/run/docker.sock
Execute “ls -l /var/run/docker.sock” again to confirm that everyone now has “rw” permission. Here are my results.
Quick Recap

- Finally, exit the container as root and log in as jenkins user – docker is now available on the container!

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

