Problems with npm registry/dns with Docker

Problems with npm registry/dns with Docker

Solving problems with Docker and DNS

Recently I needed up a container with node modules. But, some problems with npm registry and dns appear.

To solve was very easy:

Edit or create the follow file:

/etc/docker/daemon.json

And add the follow content:

{
    "dns": ["10.0.0.2", "8.8.8.8"]
}

It's will necessary restart docker:

sudo service docker restart

and that’s all folks!

If you have any doubts, problems or suggestions, just leave a message.