'docker container not able to reach some of host's ports

I have a stack with docker-compose running on a VM.

Here is a sample output of my netstat -tulpn on the VM

Proto Recv-Q Send-Q   Local Address             Foreign Address         State      
tcp        0      0   0.0.0.0:9839              0.0.0.0:*               LISTEN     
tcp        0      0   127.0.0.1:8484            0.0.0.0:*               LISTEN   

The docker is able to communicate with port 9839 (using 172.17.0.1) but not with port 8484.

Why is that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source