Hello, I need to configure NetworkHost and a container to run on each node on Docker Swarm. Because I should forward 10000-2000 udp ports and some tcp ports. I searched a bit but couldn’t find anything. I can do this in Kubernetes, but I couldn’t find how to do it in docker. Is there any way to do it on Docker ?
Thanks for your response. I need to run --network host on Docker Swarm. I can run on the Kubernetes. But could not find any solution on Docker Swarm side, i think, i m missing something.
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.
I searched for “docker swarm daemonset” since I also use Kubernetes more often.
You can specify whether the service needs to run a specific number of replicas or should run globally on every worker node. See Replicated or global services.
docker service create \
--name myservice \
--mode global \
alpine top