Cannot pull/push/run docker images

OS Version/build: Windows 10 Enterprise 22H2
App Version: Docker Desktop v4.17.1 (also tested with 4.18.0)

Steps to reproduce: Unknown, the error just appeared one day and does not vanish itself.

At first, I tried to push an image to an intern server, let’s call it “example.com”. Let the image be “webserver” and the image version “v1”. I tried executing the following command in a terminal:

docker image push docker.example.com/webserver:v1

After executing the command I got the following error:

Get "https://docker.example.com/v2/": proxyconnect tcp: dial tcp: lookup http.docker.internal on 192.168.65.7:53: read udp 192.0.0.1:32857->192.168.65.7:53: i/o timeout

I’m not sure if it’s important to mention but the server is using nexus to manage docker images.

Pulling from the same server works perfectly fine with no errors.
After some research, I tried to run

docker run hello-world

with the following output:

docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": proxyconnect tcp: dial tcp: lookup http.docker.internal on 192.168.65.7:53: read udp 192.0.0.1:46287->192.168.65.7:53: i/o timeout.

Things I’ve tried so far:

  • Setting a different DNS in Docker Desktop
  • Updating Docker Desktop
  • Turning off the VPN connection for the internal server
  • Completely reinstalling docker
  • Resetting to factory default