Set 'host' as default network for Docker
The docker build
command also has a --network
parameter that you can use to specify the network mode that should be used for intermediate containers. This flag has the same effect and possible values as the identically named parameter of the docker run
command.
--network (=default)
Set the networking mode for theRUN
instructions during build
This should allow you to build your containers with:
docker build -t yourimagename --network=host .