问题
I need to run containers from docker-compose in host network mode. For example, if I run single container, I write:
docker run --net=host my_image
How to do this part --net=host
in docker-compose?
回答1:
The equivalent in docker-comopose is network_mode: host
see the documentation in: https://docs.docker.com/compose/compose-file/
来源:https://stackoverflow.com/questions/44658101/how-to-run-docker-containers-in-host-network-mode-using-docker-compose