My build command requires container image to connect to internet to download some files. It fails during that connection. I want to specify bridged network instead of NAT one to prevent possibility that NAT connectivity causing the issue. I don’t see option to specify network in “docker build” command. Spawned containers have properly access to external network once they spawn.
Error is below
Unable to download from URI
'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''.
VERBOSE: [4EE37530AFA6]:
Not sure if you are running into this locally (dev machine) or on a remote build server. Corporate networks are a living hell.
Locally I rely on CNTLM on my dev machine to resolve both network and proxy issues. This means using “–build-arg” on docker build commands (the “http_proxy” and “https_proxy” are always valid arguments).
Your dev machine IP (from the container point of view) will vary depending on your environment.
I resolved the issue by configuring alternative “bridge” network during build command. It works fine (as expected). NATted networks on client machine was blocked by firewall on client since request seems to be coming from 172.x network and firewall was considering this requests “bad”. Can not control firewall settings in corporate network, they don’t have any issues with bridge network though.
@artisticcheese: I am facing exactly same issue.
I am a novice in using dockers. Can you please share the instructions for configuring the bridge network.
If you have issues with firewall blocking traffic then fix firewall. Creating bridge network is not a solution since this is not you are going to use for production deployment.
@artisticcheese It is a network firewall and nothing can be done about that. Plus the network requires me to login to connect to the internet.
I need a workaround by making the docker use my local machines internet connection, both while building and when running a container.