For docker-compose 2.x deployment (as in: not swarm) you can additionaly bind the host port to an ip. Since swarm might schedule the port on any node, there is no way to bind a host port to an ip.
docker-compose allows more of the ‘dirty stuff’ (override ulimits, start containers in privilaged mode and other low level stuff) that Swarm does not support (yet). If you still want multi-container on multi-node deployments, you might want to switch to kubernetes, which allows ever dirtier stuff then docker-compose can even dream of
yes, but I have been reading in the docker documentation and the “network_mode” parameter when I use the docker stack command deply compose-file = docker-compose.yml, I answered that network_mode is not supported. How could I use a parameter equivalent to network_mode: host, or what alternative is there?