DEV Community

Cover image for boot2docker DNS not working
Adam K Dean
Adam K Dean

Posted on


boot2docker DNS not working

If you're using Docker on OSX, then you'll be using a VM to run your Docker service on, as it needs Linux, not Unix. The most popular of these seems to be boot2docker, though dvm also seems to be quite popular. Other solutions are available.

I have a problem where sometimes boot2docker's DNS just doesn't seem to work.

I found some instructions on how to fix it though:

$ boot2docker ssh
$ sudo udhcpc
udhcpc (v1.22.1) started
Sending discover...
Sending select for
Lease of obtained, lease time 86400
deleting routers
route: SIOCDELRT: No such process
adding dns    
$ sudo /etc/init.d/docker restart
$ exit
Enter fullscreen mode Exit fullscreen mode

Now if you attempt to ping Google, it should work!

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git