Docker Nexus registry - connection refused

Hi,
I am trying to setup a simple docker private registry on nexus Using doker windows desktop

This is my Nexus Configuration :

And this is my docker daemon configuration:

But when I try to login I get this error:

PS C:\Users\me> docker login -u admin localhost:6666                                                                 Password:

Error response from daemon: Get http://localhost:6666/v2/: dial tcp [::1]:6666: connect: connection refused!

You need on nexus to go the Realms and add the docker bearer token realm to the active box

Hello, I have the same problem. I have set up as you mentioned. but still I am getting the same error.

{
“registry-mirrors”: ,
“insecure-registries”: [
“localhost:8085”,
“localhost:8081”
],
“debug”: true,
“experimental”: false,
“features”: {
“buildkit”: true
}
}

i faced the same problem and is solved when i ran docker on windows container [“Switch to windows container”]