Skip to content

Instantly share code, notes, and snippets.

@Inkimar
Created March 15, 2017 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Inkimar/040c0e3be05f675acb00f9ebe6810761 to your computer and use it in GitHub Desktop.
Save Inkimar/040c0e3be05f675acb00f9ebe6810761 to your computer and use it in GitHub Desktop.
troubleshooting docker when using DNS .....
If you have set up your system, so that you can run dns-docker and run into trouble.
Trouble:
$ sudo service docker restart
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
Files you should look into:
(1) /etc/default/docker
The 2 lines starting with 'DOCKER_OPTS' should be commented-out
# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
#DOCKER_OPTS="--dns 172.16.0.9 --dns 172.16.0.7"
- the file in control should now be /etc/docker/daemon.json
(2) /etc/docker/daemon.json
for instance :
{
"dns": ["172.17.0.1", "172.16.0.9", "172.16.0.7"],
"bip":"172.17.0.1/24"
}
one file that can be involved
(3) more /etc/resolv.conf
Check the logs!
$sudo systemctl status docker.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment