Docker build with vscode is givingg me an ERROR: open C:\Users\user\.docker\buildx\.lock: Access is denied

Since i can only post one image, i will post a picture that shows the error in the terminal, and my code

NOTE: i used ctrl + shift + p to create my build on vscode

Since we can’t copy from an image and search for an error message or just quote a relevant part, we prefer sharing code, texts and terminal outputs as code blocks. Not to mention that depending on what device we use the forum from, the text on the image can be hard to see. Please, follow the below guide when posting:

and share images only when you can’t copy texts or when the text is not the important part. Please, answer the following questions too:

  • Do you use Docker Desktop? I’m pretty sure you do, but you didn’t mention it and you opened the topic in the “Docker Hub” category. I gues you have no problem with Docker Hub,…
  • Cany ou access that lock file from outside vscode?
  • Have you checked the ownership and permissions of that file?
  • Do you remember anything that happened before you started to et this message? For example a Docker Desktop update or Docker Desktop crash, or moved .docker fodler to a new user home?