Docker Community Forums

Share and learn in the Docker community.

Docker build hangs


(Psvensson) #1

I just solved a hairy problem and wanted to share.
I just moved a service to a new production environment and installed latest docker && docker-compose. The service is node.js based so I ran my usual build script which failed continually. The build environment is Ubuntu 16.04 vanilla VMs

When doing npm install it always hangs after a number of lines and never recovers or gives an error.

After lots of guessing I tried to force the network docker build uses, and that was the ticket;

docker build -t . --network host

It seems like the docker build image is not allowed access through whatever default networking setup is there after installation. Weird.