Drone can't connect GOG during build phase

I was reluctant to post this, but after days of research I stuck…

ISSUE: I do a push to GOGS and DRONE is triggered. However during build phase DRONE fails. The error I see in DRONE is:
"Initialized empty Git repository in /drone/src/.git/
+ git fetch origin +refs/heads/master:
fatal: unable to access ‘http://172.17.0.4:3000/carello/chet21.git/’: Failed to connect to 172.17.0.4 port 3000: Operation timed out

For the background information:

  1. GOGS is successful executing a WEBHOOK (response 200)
  2. Running on MAC/Mojave with DOCKER Engine: 18.09.2
  3. GOGS and DRONE are in containers and in the same docker network bridge
  4. I don’t think I have a network connectivity issue. I verified by standing up a new container where I could execute a git clone on the GOGS repo (carello/chet21). Also I was able to do a WGET to the drone container successfully.
  5. I also reconfigured GOGS to use the localhost address and got similar error.
    "Initialized empty Git repository in /drone/src/.git/
    + git fetch origin +refs/heads/master:
    fatal: unable to access ‘http://localhost:10080/carello/chet21.git/’: Failed to connect to localhost port 10080: Operation timed out
  6. I am able to git clone from outside the containers as well (ie from my desktop)

Here’s my DRONE run config:
docker run
–volume=/var/run/docker.sock:/var/run/docker.sock
–volume=/Users/cpuskarz/mygogs/drone:/data
–env=DRONE_GIT_ALWAYS_AUTH=false
–env=DRONE_GOGS_SERVER=http://172.17.0.4:3000
–env=DRONE_RUNNER_CAPACITY=2
–env=DRONE_AGENTS_ENABLED=false
–env=DRONE_SERVER_HOST=172.17.0.5 \ (note: I also tried this with 127.0.0.1)
–env=DRONE_SERVER_PROTO=http
–env=DRONE_TLS_AUTOCERT=false
–env=DRONE_LOGS_PRETTY=true
–env=DRONE_LOGS_DEBUG=true
–publish=80:80
–publish=443:443
–restart=always
–detach=true
–name=drone
drone/drone:1

Appreciate the insights/thoughts.

This is definitely a networking issue. You probably need to set DRONE_RUNNER_NETWORKS. I recommend searching this mailing list for more details about DRONE_RUNNER_NETWORKS and the Operation timed out error.
http://discuss.harness.io/t/cloning-failure-operation-timed-out/4733

thanks I just ran across this in the mailers BUT that command has no effect. I still see a new network being turned up in docker . I’m running v1.0.0 code and have tried v1.2.1. still no effect. As I’m reading the mailers, it appears no one has gotten this to work. Basically, I want DRONE to turn up the container in the same network as my GOGS. Im using a bridge driver and DRONE and GOGS are both in the bridge network. but when DRONE spins up a container to talk to git, it puts this container in a new network… thanks in advance.

I’m not using Docker-compose. Just straight docker