Running nomad in docker

Hi all.
I am trying to create docker-compose file to run nomad/consul.
Everything is working when we run it on Linux but, when we try to run same jobs on MacOS or WSL, jobs which have network mode = bridge are failing

...
network {
mode = "bridge"
}
...

We get error “Constraint missing network filtered 1 node”

Is this limitation of MacOS/WSL because we are running nomad in docker container or there is some additional configuration we need to do

Thnx

Try using the host network mode instead of the bridge mode in your Nomad Job configuration when running on MacOS or WSL. This can help overcome the “Constraint missing network filtered 1 Node” error. Use the following configuration snippet:

network {
  mode = "host"
}