Home > Back-end >  Cant access container from browser
Cant access container from browser

Time:12-06

I'm trying to access the container from my laptop1 which is hosted on my other laptop2 Ubuntu 22.04 LTS. I'm using putty to access ports. Through putty, I can access port 8080 but can't access other port 8081 where my container is hosted.

Here is my docker-compose file : docker-compose.yml

CodePudding user response:

Hello please do a netstat(sudo netstat -lntup)inside your jenkins container (laptop2) and check wether it's listening on 8081 or not.

If it's listening then may be 3 reason you are unable access your jenkins container from laptop1

  1. Disable ufw(firewall) status and

2.selinux (disable state)

3.if your are using azure, aws Or other cloud services check inbound traffic to allowed on 8081.

CodePudding user response:

Jenkins by default run on port 8080. Please change your docker-compose ports section to

ports:
  - "8081:8080"
  • Related