<p>Kubernetes has a concept of pods where containers can share ports between them. For example within the same pod, a container can access another container (listening on port 80) via <code>localhost:80</code>.</p>

<p>However on docker-compose, <code>localhost</code> refers to the container itself.</p>

<p>Is there anyway to implement the kubernetes network config on docker?</p>

<p>Essentially I have a kubernetes config that I would like to reuse in a docker-compose config, without having to modify the images. </p>

<p>I seem to have gotten it to work by adding <code>network_mode: host</code> to each of the container configs within my docker-compose config.</p>
