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

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 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

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?

Please see this thread 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 thread.