In a Docker Compose file, I can easily publish a range of ports using the short-form syntax:
ports:
- "3000-3010:3000-3010/udp"
But in my case, I need those ports as "mode=host" to bypass the swarm overlay network. The short-form syntax can't express that, so I need to use the long-form:
ports:
- published: "3000-3010"
target: "3000-3010"
protocol: udp
mode: host
However, it seems that Docker doesn't like specifying ranges with the long-form syntax, as I get that error when deploying a stack:
services.test.ports.0.target must be a integer
Is there a way to do that (except brute-force by specifying each and every port in the range as long-form) ?