# Build fail due to DNS lookup issue with git as container on the same host

**URL:** <https://drone.discourse.group/t/build-fail-due-to-dns-lookup-issue-with-git-as-container-on-the-same-host/11110>\
**Category:** Drone Support\
**Created:** [March 24, 2018, 10:28am UTC](https://drone.discourse.group/t/build-fail-due-to-dns-lookup-issue-with-git-as-container-on-the-same-host/11110 "2018-03-24T10:28:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hhenkel](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/hhenkel/32/4149_2.png) [@hhenkel](https://drone.discourse.group/u/hhenkel)\
**Post date:** [March 24, 2018, 10:28am UTC](https://drone.discourse.group/t/build-fail-due-to-dns-lookup-issue-with-git-as-container-on-the-same-host/11110/1 "2018-03-24T10:28:12Z")

</div>

Hi,

I’m currently toying around with drone and gitea on a single node running in swarm mode. I currently use a setup similar to what is described at [https://github.com/flexguse/traefik-inter-container-routing](https://github.com/flexguse/traefik-inter-container-routing) with network aliases. I’m able to connect drone to gitea and also the notifications through webhooks are working fine.

However my simple builds are failing. As from what I understand the git plugin is launched as an extra container and it fails to lookup the gitea instance running behind traefik. It is also not able to directly connect as from what I understand a random network is created and docker internal lookups are not working as gitea provides the fqdn in the webhook.

What is the best option to get drone working with a local git server on a single host without relying on public DNS lookups?

Kind regards,

Henning

---

<div class="post-metadata">

**Author:** ![hhenkel](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/hhenkel/32/4149_2.png) [@hhenkel](https://drone.discourse.group/u/hhenkel)\
**Post date:** [March 31, 2018, 12:51pm UTC](https://drone.discourse.group/t/build-fail-due-to-dns-lookup-issue-with-git-as-container-on-the-same-host/11110/2 "2018-03-31T12:51:21Z")

</div>

Since no one replied so far I’m not sure how to solve my issue. Maybe I phrased my problem to complicated and don’t see the obvious - so I’ll describe what I try to achieve:

I got a single KVM based VM with running Centos 7 with docker CE (currently in swarm mode). I want to be able to run drone and gitea on the same VM side by side.

Gitea and Drone are behind a traefik container. Gitea is reachable under git.kvm.home ad the drone UI is reachable under drone.kvm.home

Gitea, Drone and Traefik are currently sharing a network and I’m able to login to drone through gitea.

What currently is not working is the drone git container checking out a git repository from gitea due to network / lookup issues.

Is there an easy way to set this up correctly?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [March 31, 2018, 5:33pm UTC](https://drone.discourse.group/t/build-fail-due-to-dns-lookup-issue-with-git-as-container-on-the-same-host/11110/3 "2018-03-31T17:33:21Z")

</div>

Please see [this thread](http://discuss.harness.io/t/all-local-gogs-drone-subnet-issues-cannot-fetch/491/3) which discusses the same topic and resolution. TLDR is that you need to use the DRONE\_NETWORK variable configure all pipeline containers to connect to your gitea docker network.

Lets move this discussion to the [existing](http://discuss.harness.io/t/all-local-gogs-drone-subnet-issues-cannot-fetch/491/3) thread.

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [March 31, 2018, 5:34pm UTC](https://drone.discourse.group/t/build-fail-due-to-dns-lookup-issue-with-git-as-container-on-the-same-host/11110/4 "2018-03-31T17:34:16Z")

</div>

Closed on March 31, 2018, 5:34pm UTC


