I am setting up a new work computer, and ran into an issue building a Docker Image. The error was along these lines:
"Failed to solve: Canceled: context canceled"
I had never seen this on a past computer, so I was confused. I am the only one on the team who uses IntelliJ over VSCode, so it turned out to be an IntelliJ related issue. The Docker Build command was trying to process IntelliJ's .idea folder and that caused weird behavior.
The solution was to create a .dockerignore file and put this in it:
Telling Docker to ignore the .idea folder solved the issue, and things started building properly again.
Thanks to This StackOverflow answer for the fix.
Before this problem I didn't even know that docker supported a .dockerignore file, but the convention is very similar to a .gitignore file.