Docker-compose open all ports
docker-compose version 1.25.0
Use it like following
ports: [22, 23]
It needs to be array of port numbers.
I'd recommend using port ranges i.e
ports:
- "1-65535:1-65535"
You will probably need to tinker with this range according to your app specifications so that you won't accidentally expose something that's already in use by the host (such as SSH).