Reputation: 1
In the below docker-compose file:
version: '2'
networks:
network1:
name: my-net
driver: bridge
external: true
What does external
property signify?
Upvotes: 5
Views: 4959
Reputation: 11193
It means docker-compose
won't create the network. The network should be created externally before running docker-compose up
. By default, compose manages the network creation. external: True
flag is used to make the containers join a pre-existing network instead.
external
If set to true, specifies that this network has been created outside of Compose. docker-compose up does not attempt to create it, and raises an error if it doesn’t exist.
Upvotes: 8