Not able to map ports on two different containers to two different IP addresses on the same host‏

Hi I am a newbie to Linux as well as Docker so this may very well be a Linux issue but from all I can say it seems to be an issue with docker.


I have a Linux host machine (running amazon Linux) which two I adapters each having a unique IP address, for example:


Without installing docker on this machine I can easily configure two websites on this host, each listening on port 80 of an individual IP, for example I can have Web1 listening on port 80 of and Web2 listening on port 80 of

Now I run one docker container for WEB1, and map its port 80 to port 80 of on the host, works perfectly fine without any issues.

I run another docker container for WEb2 and map its port 80 to port 80 of on the host… and that does not work at all.

I know there are other options like using reverse proxy on the host and all that stuff but this simple scenario of a container port being able to map to a port on a dedicated IP address of the host should also work…

Please let me know if it is not designed to work this way