While running the >docker build . -t [imagename] command we may get the below error
failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch oauth token: Get “https://auth.docker.io/token?scope=repository%3Alibrary%2Fopenjdk%3Apull&service=registry.docker.io”: net/http: TLS handshake timeout
The problem could have possible solutions:
- make sure that you are running the command from the Dockerfile directory
- Dockerfile name is correct. It should not be “dockerfile” or “DockerFile”
- Even if these won’t solve the problem. Logout and login to the docker using below commands
>docker logout
>docker login -u
Leave a Reply