Use host network for swarm container

Hi @nishitmv, thanks for the reply. My original question was not phrased in the best way, let me try to clarify.

I managed to get it working by creating the service manually, outside my compose file, with the following command:

docker service create --env-file ./coturn.env
–mount type=bind,source=xxx.pem,destination=/etc/ssl/turn_server_cert.pem
–mount type=bind,source=xxx.pem,destination=/etc/ssl/turn_server_pkey.pem
–replicas 1 --name coturn --network host boldt/coturn

So, is there an option to be used in the compose file that does the same as the --network option from the command line ?