Docker hub endpoints

Hi All,

I am running Docker Desktop 4.24.2 (124339) . Currently the newest. I am trying to build a local image using the command

docker build -t justpraveenjust/eureka-server:0.0.1 .

However, I get the following error:

[+] Building 1.3s (3/3) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 176B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for docker.io/adoptopenjdk/openjdk11:j 1.2s

[internal] load metadata for docker.io/adoptopenjdk/openjdk11:jdk-11.0.11_9-alpine:


Dockerfile:1

1 | >>> FROM adoptopenjdk/openjdk11:jdk-11.0.11_9-alpine
2 | WORKDIR /opt
3 | COPY target/*.jar /opt/app.jar

ERROR: failed to solve: adoptopenjdk/openjdk11:jdk-11.0.11_9-alpine: error getting credentials - err: exit status 1, out: error getting credentials - err: exit status 1, out: no usernames for ht tps://index.docker.io/v1/``

Looks like the docker cli is using the docker hub end point v1, which is deprecated. How and where do I the correct v2 urls?

Or is there some other issue here???

Ive already installed and uninstalled dockercli n desktop many times. Spent 2 days. However, no luck yet.

Thanks in advance…

Figured it out…

The access was denied to ```
/home/user/.docker/config.json

However, i never got that error on console. Always got the error mentioned above.

So followed the Steps mention in the URL https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket

Deleted the config json and then I got access denied to UDP ```
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post h t t p ://%2Fvar%2Frun%2Fdocker.sock/v1.38/containers/create: dial unix /var/run/docker.sock: connect: permission denied.

Followed the link and gave permission to .sock and things started working…

Adding the steps here to help others who face this.