Specify a host or a custom dns in drone-git image

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

FROM plugins/drone-git
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
panic: EOF
goroutine 1 [running]:
panic(0x52a260, 0xc82000a100)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/drone-plugins/drone-git/vendor/github.com/drone/drone-plugin-go/plugin.MustParse()
/drone/src/github.com/drone-plugins/drone-git/vendor/github.com/drone/drone-plugin-go/plugin/param.go:129 +0x59
main.main()
/drone/src/github.com/drone-plugins/drone-git/main.go:48 +0x54a

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.

FIX

in my blog: use private dns to fix it

yum install dnsmasq -y
vim /etc/docker/daemon.json

{
    "dns": ["10.123.12.14"]
}

https://www.chenyudong.com/archives/docker-custom-hosts-network-via-dns.html

http://discourse.drone.io/t/fix-git-clone-with-custom-extra-hosts/217

thats exactly what i do right now. i define a dns server for the docker daemon.