Docker SSL issues

HI all,

I’m trying to connect to Github from within the Docker runner in a k8s cluster but the Drone task can’t seem to connect to https://github.com and gives me the following error:

ERROR     [ERROR]: failed to download the file: <urlopen error _ssl.c:980: The handshake operation timed out>

From wtihin the dind drone-runner container I can access github without issues, but when I try the same from within the Docker container running within the dind container I’m getting these SSL errors.

I am by no means an expert so maybe I’m missing something obvious, but please let me know if there is anything I can do to make this work.

$ kubectl -n drone get pods                                                                            main default/drone
NAME                                              READY   STATUS    RESTARTS   AGE
drone-7c99fd7bc7-q6smc                            1/1     Running   0          3h4m
drone-drone-kubernetes-secrets-6d58c99659-qb498   1/1     Running   0          3h5m
drone-drone-runner-docker-84d697b57d-x5csw        3/3     Running   0          176m

$ kubectl exec -ti drone-drone-runner-docker-84d697b57d-x5csw -n drone -- sh                           main default/drone
Defaulted container "dind" out of: dind, gc, drone-runner-docker
/ # wget https://github.com
Connecting to github.com (20.248.137.48:443)
saving to 'index.html'
index.html           100% |*******************************************************************************************|  221k  0:00:00 ETA
'index.html' saved

/ # docker --host tcp://localhost:2375 ps
CONTAINER ID   IMAGE                             COMMAND                   CREATED          STATUS          PORTS     NAMES
6737abb10d0c   ansible-runner:latest             "/bin/sh -c 'echo \"$…"   23 minutes ago   Up 23 minutes             drone-kE69OXS4SBsLRAXFzU0T

/ # docker --host tcp://localhost:2375 exec -ti drone-kE69OXS4SBsLRAXFzU0T curl -vv https://github.com
*   Trying 20.248.137.48:443...
* Connected to github.com (20.248.137.48) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to github.com:443