I thought I missed that part in the title then I realized, you changed it It is clear now. I don’t use swarm regurarly so I am not sure how you should do it if the network_mode
doesn’t work in the stack file. There are others more familiar with swarm who will help you, I am sure. I will search for it too, later.
Update:
I found this:
You can also use a
host
network for a swarm service, by passing--network host
to thedocker service create
command