Please post your full installation / configuration. Are you using docker-compose? What hostname does docker compose use when linking your container environments to the shared network? If you are not using docker-compose how have you linked the container networks? We know for certain this is a networking issue, however, it is unclear what you configuration looks like.
Where is this resolution failing? The Drone container or the runner? Because if I enter the drone container, I can run the following:
For the runner, I added it to the hosts file and so I get the following:
Resolution does not happen in either of these containers – the clone does not happen in either of these containers. Drone creates a new container for each pipeline step including the clone step.
Here are some existing threads that address this error and some of your questions:
- http://discuss.harness.io/t/could-not-resolve-host-on-clone-step/3311
- http://discuss.harness.io/t/strategy-to-use-docker-network-aliases-during-build/3865/6
- http://discuss.harness.io/t/solved-cannot-clone-gitea-repository-missing-server-url/1679/4
- http://discuss.harness.io/t/drone-docker-agents-on-custom-network/3732/3
I really do recommend asking for a working configuration in the Gitea forums. Many of the Gitea maintainers are also Drone contributors and can probably provide you with a sample docker-compose file that you can use as reference.