Search code examples
dockerdockerfile

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/`` Docker ERROR

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.


Solution

  • 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