Docker repository setup to be able to get docker image moby/burnkit from Nexus

Hello, I am using Nexus as a repository for Docker images. We have both a private docker repo and a proxy docker repo. We pull docker images from Nexus instead of from the Docker hub because for security reasons our servers don’t have access to external internet resources.
After an upgrade a docker we do get this error when we build docker images:

[2C[ ###building the image##### ] 08:50:26 WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load 08:50:26 #1 [internal] booting buildkit 08:50:26 #1 pulling image moby/buildkit:buildx-stable-1 0.1s done 08:50:26 #1 ERROR: Error response from daemon: Get “https://registry-1.docker.io/v2/”: dial tcp 54.227.20.253:443: connect: connection refused 08:50:26 ------ 08:50:26 > [internal] booting buildkit: 08:50:26 ------ 08:50:26 ERROR: Error response from daemon: Get “https://registry-1.docker.io/v2/”: dial tcp 54.227.20.253:443: connect: connection refused

It looks like with the newer versions of Docker, the build of images requires this extra docker image named moby/buildkit:buildx-stable-1 0.1 .

That is an issue because Docker tries to get that image from the Dockerhub url https://registry-1.docker.io/v2/ and that external connection is not allowed as mentioned earlier.

Would you be able to to let me know the best way to configure Docker that instead of trying to go to DockerHub to download the docker /moby/buildkit it would go instead to the Nexus Docker proxy and that moby/buildkit image would be proxied by Nexus?

Currently I don’t have any mirror in the daemon.json docker config.

See
to see docker config: cat /etc/docker/daemon.json

{
“bip”: “10.15.0.1/24”,
“icc”: false,
“log-level”: “info”,
“iptables”: true,
“authorization-plugins”: [],
“live-restore”: true,
“userland-proxy”: false,
“experimental”: false,
“no-new-privileges”: true,
“userns-remap”: “default”,
“data-root”: “/u01/docker”,
“log-driver”: “syslog”,
“debug”: true
}

Thanks to provide me the changes to make if that is the direction I should go and any other suggestions.

Thank you