简体   繁体   中英

Docker | failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc

I have been trying to build image in docket but this error occured.

failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out: error getting credentials - err: exit status 1, out: no usernames for https://index.docker.io/v1/`` 码头工人错误

I searched on stackoverflow and here is potential reason, that docker desktop running on linux container and the image is build from windows image.

Now, about my P.C:

  • Main OS is Windows 10.
  • I use VM to open ubuntu.
  • I use ubuntu to write my code.
  • I previously downloaded docker on windows, than on ubuntu.
  • docker wasn't working on both OS becouse virtualization wasn't enabled on my machine.

Now i'm working in Ubuntu, what is the solution to my problem?

If the problem is really building my image from windows, how can I build it from ubuntu instead?

I have tried to solve this problem..

Expecting this error to go and build my dockerfile.

I searched for a while on this one. Docker gets in a muddle with your credentials. This following worked for me. Make sure you are logged in on docker desktop then:

rm ~/.docker/config.json

Then do docker login to refresh the credentials

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM