# Prevent Docker from using Google DNS

**URL:** <https://meta.discourse.org/t/prevent-docker-from-using-google-dns/49004>\
**Category:** Self-hosting\
**Tags:** docker\
**Created:** [August 22, 2016, 1:24pm UTC](https://meta.discourse.org/t/prevent-docker-from-using-google-dns/49004 "2016-08-22T13:24:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [August 22, 2016, 1:24pm UTC](https://meta.discourse.org/t/prevent-docker-from-using-google-dns/49004/1 "2016-08-22T13:24:23Z")

</div>

So I am attempting to install Discourse in production for the first time. I am doing this on a college campus, where external DNS servers (like Google) are blocked. As such, when attempting to bootstrap Discourse it fails. How can I change Docker to use the host PCs DNS settings, or manually set Docker’s DNS addresses?

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [August 22, 2016, 1:31pm UTC](https://meta.discourse.org/t/prevent-docker-from-using-google-dns/49004/2 "2016-08-22T13:31:55Z")

</div>

You need to pass the dns server ip to the docker service. How to do this changes depending on your Linux distribution and version.

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [August 22, 2016, 1:32pm UTC](https://meta.discourse.org/t/prevent-docker-from-using-google-dns/49004/3 "2016-08-22T13:32:36Z")

</div>

Ubuntu Desktop 14.04 LTS

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [August 22, 2016, 1:33pm UTC](https://meta.discourse.org/t/prevent-docker-from-using-google-dns/49004/4 "2016-08-22T13:33:28Z")

</div>

See

> <https://stackoverflow.com/questions/24151129/network-calls-fail-during-image-build-on-corporate-network/24189767#24189767>

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [August 22, 2016, 1:45pm UTC](https://meta.discourse.org/t/prevent-docker-from-using-google-dns/49004/5 "2016-08-22T13:45:48Z")

</div>

Thanks Falco! That did it!

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [August 22, 2016, 1:46pm UTC](https://meta.discourse.org/t/prevent-docker-from-using-google-dns/49004/6 "2016-08-22T13:46:44Z")

</div>


