0

Is it possible to make all ports opened in Docker? I suppose that I can create network and set it up somehow, but I can't find how (while I know that it's possible).

To be precise I mean that i want to have in docker-compose.yml

   networks:
      - my_network

instead of

   ports:
      - 12000:12000

   networks:
      - my_network
Yura
  • 969
  • 14
  • 33
  • Does this answer your question? [Docker expose all ports or range of ports from 7000 to 8000](https://stackoverflow.com/questions/28717464/docker-expose-all-ports-or-range-of-ports-from-7000-to-8000) – SiHa Mar 26 '20 at 14:32

1 Answers1

1

Use host network that way all ports will be open.

Use network_mode in the yaml file

network_mode: "host"
kooskoos
  • 4,622
  • 1
  • 12
  • 29