When I install a docker tomcat container using docker I can see it is assigned an ip etc. However when I use marathon/mesos to deploy and run a docker container I see is is not assigned an ip. I ran the docker inspect in both the cases and found this difference. Can someone comment why is this difference?
By default Mesos/Marathon use docker's Host networking mode, so that all container ports are directly exposed on the host's ports on the host IP. You can use Bridge networking mode so that the container has its own IP and you have to manually specify which container ports to forward to which host ports. See the "Bridged Networking Mode" section in https://mesosphere.github.io/marathon/docs/native-docker.html