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:
- GOGS is successful executing a WEBHOOK (response 200)
- Running on MAC/Mojave with DOCKER Engine: 18.09.2
- GOGS and DRONE are in containers and in the same docker network bridge
- 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.
- 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 - 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.