Vytvárajte siete automaticky v aplikácii Docker Compose

Príklady kódu

0
0

Vytvárajte siete automaticky v aplikácii Docker Compose

external is to use an existing network. If you want compose to make networks you simply do:

networks:
  network1:
  network2:
.. to instruct compose to make the networks. They will be named <compose-dir>-<network name> Verify the creation by using docker network ls.

You can also override the default network or specify more properties.

networks:
  default:
    driver: bridge
    driver_opts:
      com.docker.network.driver.mtu: 1450
.. will override the default network setting MTU to 1450 (handy when the host have lower than 1500 mtu and path mtu discovery doesn't work properly). There are other bridge driver options.

external makes more sense when you want services in two compose setups to talk to each other or you have a manually created network.

Podobné stránky

Podobné stránky s príkladmi

V iných jazykoch

Táto stránka je v iných jazykoch

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................