Hi I'm a little confused by what he's saying in this video <https://kodekloud.co . . .

Dale Cooper:
Hi I’m a little confused by what he’s saying in this video https://kodekloud.com/topic/demo-advanced-docker-run-features/

He says you can access a running container like jenkins at its port 8080 if you find the container’s internal ip. What does he mean by a container’s internal IP?

Regardless of wether or not I’m using a mac or another machine, it sounds like there are two IPS: one for the computer, the machine that has installed and runs docker, and one for the “docker host”, which manages the containers. I feel like he uses the word docker host in various ways.

Dale Cooper:
Also, he references the “UI of his docker host”. and I’m very confused by what he means by that. What is the UI of his docker host vs the UI of the computer he uses which has docker installed on it?

siva gatla:
Docker host is where you docker software running. If you install docker in your personal laptop, then it will become docker host.

And if you have a container which runs all web application on port 80 (or whatever), you can simply forward the port to your host machine and access the web app like “localhost:8080” (if you forwarded 80 to 8080)

Alistair Mackay:
Hi @Dale Cooper

Docker creates a virtual network in which to run containers. As mentioned by @siva gatla, the host is the machine running the docker software, e.g. your laptop.

Let’s look inside a running container to see the internal IP

docker run -d --name test wbitt/network-multitool
docker exec -it test /bin/sh

/ # ifconfig
eth0      Link encap:Ethernet  HWaddr 02:42:AC:11:00:02
          inet addr:172.17.0.2  Bcast:172.17.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1086 (1.0 KiB)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

From the output of ifconfig, we can see the interface eth0 connected to the docker network

The internal IP here is 172.17.0.2 and from the mask we can tell that the network created by docker is 172.17.0.0/16 which means the network can support 65536 IP addresses, so you can theoretically run 65534 containers, as the addresses 172.17.0.1 and 172.17.255.255 are reserved

(Docker Training Course for the Absolute Beginner)
I’d like to suggest a re-recording or update for the lecture “Demo - Advanced Docker Run Features”, as the current version may cause confusion for absolute beginners due to the following reasons:

1. Explanation of docker ps Output — Incomplete

In the current video, the PORTS column is not adequately explained. For example, in the attached screenshot, the docker ps output shows:

PORTS
8080/tcp, 50000/tcp

:mag: What this means:

  • 8080/tcp: This is Jenkins’ internal web UI port.
  • 50000/tcp: Used by Jenkins agents (JNLP).
  • However, there’s no -> symbol, which means these ports are not mapped to the host (i.e., they are not accessible externally).

:pushpin: Why the Jenkins UI is inaccessible at http://localhost:8080:
Because the container was started with just:
docker run jenkins/jenkins

No ports were published, so the host cannot access the container’s internal ports.

:white_check_mark: Proper command to expose ports to host:
docker run --name myjenkins -p 8080:8080 -p 50000:50000 -d jenkins/jenkins

This results in:
PORTS
0.0.0.0:8080->8080/tcp, 0.0.0.0:50000->50000/tcp

allowing access via browser at http://localhost:8080.

2. Docker Desktop Note – No VM IP Available

The lecture mentions accessing Jenkins via an internal VM, using container IP. However, on Docker Desktop, no separate VM is created or exposed this way — students should instead access via localhost, post exposing the ports.

3. Clarify: Use localhost, Not IP Address

Please recommend using:
http://localhost:8080

instead of fetching or guessing the host’s IP address.

  1. Fetching Jenkins Setup Password
    Include the command to retrieve the Jenkins setup password:
    docker exec <container_name> cat /var/jenkins_home/secrets/initialAdminPassword

These clarifications can significantly reduce confusion for learners who are new to Docker and Jenkins. Thank you for the great content so far!

Best regards,
Aditya Garg