I have to use a setup that I use a private company only gogs/gitea server. Login and everything works with drone and gogs. i specified a custom dns in the docker-compose for drone. this dns settings is not used within drone-git cloning. In http://discourse.drone.io/t/help-git-clone-with-custom-extra-hosts/217 its written that we should modify the drone-git image. so i thought im pretty smart and did a
ENTRYPOINT /bin/sh -c “echo 192.168.1.1 git.mycompany.site >> /etc/hosts” && /bin/drone-git
like this the /etc/hosts gets modified but there is a go error on cloning:
Drone Git Plugin built from 43dcd64
goroutine 1 [running]:
what else i should modify? i really need a custom host for cloning.
UPDATE: i read myself through some docs. maybe its a problem with ubuntu and its networkmanager as host. i ran drone now on my main docker host box. there where also gogs is running. everything worked fine. plugins/git could resolv the dns. something new for me was that docker mounts /etc/resolv.conf in the container to have the dns setup from the host. on a ubuntu box with networkmanager the resolv.conf has 127.0.1.1 in it and in the container its the default google dns servers. maybe thats where the problem is. the best thing would be if we could define a dns server in the .drone.yml like in a docker-compose file.