Reputation: 8091
What does the option --network host
actually do indocker build --network host .
? What behaves differently for having the option set vice the default?
Upvotes: 5
Views: 14609
Reputation: 6147
The --network
flag specifies which Network mode is used for the RUN
commands during build.
Sets the networking mode for the run commands during build. Supported standard values are: bridge, host, none, and container:<name|id>. Any other value is taken as a custom network's name to which this container should connect to.
By default, docker uses the bridge network driver, which connects the containers to a network separate from the host. If you instead use host networking the network stack of the container is not isolated from the host.
Upvotes: 10