We have the following setup:
- main server that hosts a Drone master container and a Drone runner container
- runner server that only host a Drone runner container
On the runner server we would like to let all the steps communicate with containers launched separately (Docker Compose) and that are connected to their own network.
In order to perform that, I’ve set the environment variable
DRONE_RUNNER_NETWORKS to the user-defined Docker network where the other containers are connected only on this server:
$ sudo docker exec -ti drone-runner sh / # env HOSTNAME=a1eec5141e23 SHLVL=1 HOME=/root GODEBUG=netdns=go DRONE_PLATFORM_OS=linux DRONE_RPC_HOST=drone.mycorp.tld DRONE_PLATFORM_ARCH=amd64 TERM=xterm PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DRONE_RPC_PROTO=https DRONE_RUNNER_CAPACITY=14 PWD=/ DRONE_RUNNER_NETWORKS="custom_bridge" DRONE_RPC_SECRET=xxxxx DRONE_RUNNER_NAME="drone-runner"
Howerver when relaunching the pipeline it fails:
<buildname> Error response from daemon: network <network_id> not found
I’ve tried to restart the Drone runner container and dockerd, but that didn’t help.
I’ve also tried to create the same user-defined network on the main server in case the issue was refering to it missing on that other server, but that didn’t help either.
Finally I’ve tried to simulate this from another container that shares the host’s Docker socket as we do for the Drone runner and it works great (I’m able to see the user-defined network). I’m not sure how I could do that from the Droner runner container given that the native Docker CLI is not present.
Thanks for your help and advice.