Jenkins failing to connect to docker while building

When building, the build fails and says this:

+ docker build -t 952a7fca404f04672b125bcef0724b45f5e3710c -f Dockerfile .
ERROR: error during connect: Get "https://docker:2376/_ping": dial tcp: lookup docker on 127.0.0.53:53: server misbehaving

sounds like a dns server issue.

googling gies me Error from server: error dialing backend: dial tcp: lookup worker-1 on 127.0.0.53:53: server misbehaving · Issue #630 · kelseyhightower/kubernetes-the-hard-way · GitHub as the first result

I am running jenkins in a docker container and it cannot connect to the docker dameon, but it can resolve and preform regular http requests just fine

your error message says you are trying to connect to “docker” dns entry on port 2376, and the dns server is going “nope”

Its a kubernetes error. I’m not sure what http has to do with it.

I am not using kubernetes.