How to use host network for docker compose?

The equivalent configuration for docker-compose v3 is using the network_mode key: https://docs.docker.com/compose/compose-file/compose-file-v3/#network_mode

You should set network_mode to "host" in your docker-compose.yml.

If using docker swarm, see codestation’s answer.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)