Unable to send api from one container to another

Hi All,

I’ve recently wanted to communicate between two docker. However i found out that the port that is opened in my docker and outside my docker is different, causing me unable to call api from one container to another. Please find some of my findings below, hopefully it helps.


Docker Container 1: Backend Server

Starting Nmap 7.60 ( https://nmap.org ) at 2020-04-09 07:45 UTC
Nmap scan report for 192.168.0.111
Host is up (0.000079s latency).
Not shown: 995 filtered ports
PORT STATE SERVICE
22/tcp closed ssh
139/tcp open netbios-ssn
445/tcp open microsoft-ds
5000/tcp closed upnp
8000/tcp open http-alt


Docker Container 2: Object Store (Minio)

API : 192.168.0.111:9000


Local Machine

IP : 192.168.0.111

Starting Nmap 7.60 ( https://nmap.org ) at 2020-04-09 15:49 +08
Nmap scan report for autotest-B365M-DS3H (192.168.0.111)
Host is up (0.000079s latency).
Not shown: 994 closed ports
PORT STATE SERVICE
139/tcp open netbios-ssn
445/tcp open microsoft-ds
5001/tcp open commplex-link
5002/tcp open rfe
8000/tcp open http-alt
9000/tcp open cslistener << I want to use container 1 to connect this port


Anyone knows what is the problem for this case? Im quite new to docker now, still in learning process. Appreciate for any kind of helps!

Thanks