skip to Main Content

I have docker running on centos vm(on vmware) with host machine of windows. I can able to ping centos vm IP address from host(windows) machine ip.

I tried below on centos vm,

docker run -it -p 8080:8080 -p 50000:50000  jenkins/jenkins

2020-11-21 18:41:28.924+0000 [id=27]    INFO    jenkins.InitReactorRunner$1#onAttained: Completed initialization
2020-11-21 18:41:29.116+0000 [id=20]    INFO    hudson.WebAppMain$3#run: Jenkins is fully up and running

Below is the output of "docker ps"

# docker ps 
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                                              NAMES
16a6d00b0933        jenkins/jenkins     "/sbin/tini -- /usr/…"   8 minutes ago       Up 8 minutes        0.0.0.0:8080->8080/tcp, 0.0.0.0:50000->50000/tcp   bhaskara

But when i try to access from host machine(windows) browser like below,

http://centos_vm_ip:8080

Am getting like "Site can’t be reached"

Also, On centos vm I have opened port 8080

# firewall-cmd --list-all
public (default, active)
  interfaces: eno16777736
  sources:
  services: dhcpv6-client ssh
  ports: 80/tcp 8080/tcp
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules:

Any idea, how to solve this issue?

TIA

2

Answers


  1. You probably need to configure port forwarding in VMware, so you can access Jenkins from your host.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search