DEV Community

Nathan Crum
Nathan Crum

Posted on

VSCode Dev Container Failing to Build

I hope this helps others who may have come across this problem. A workspace I have with a dev container that has worked in the past was unable to build suddenly. The error I was getting was:

docker: Error response from daemon: invalid mount config for type 
"bind": bind source path does not exist: 
\\wsl.localhost\Ubuntu\mnt\wslg\runtime-dir\wayland-0
Enter fullscreen mode Exit fullscreen mode

After a while of searching I navigated to \wsl.localhost\Ubuntu\mnt\wslg\runtime-dir\ on my Windows laptop and found that there was a wayland-0 and a wayland-0.lock file in the folder. I deleted these files and to rebuild and reopen my workspace in the dev container. This time it was successful and those files were not recreated. I can't tell you why this was an issue. I can only share what worked in my case. YMMV

Top comments (5)

Collapse
 
rreganjr profile image
Ron Regan •

I'm running on ubuntu and had a similar issue:

docker: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /run/user/1000/wayland-0.
See 'docker run --help'.
Enter fullscreen mode Exit fullscreen mode

in my case I had to delete the wayland-0 and wayland-0.lock files in /run/user/1000/

your post helped, thanks

Collapse
 
jjstanton profile image
jjstanton •

Thank you! This was driving me crazy!

Collapse
 
trantn profile image
Aidan •

thank you so much, this solution is very great

Collapse
 
keestalkstech profile image
Kees C. Bakker •

Solved this issue for me: github.com/microsoft/vscode-remote...

Super thanks!

Collapse
 
rajendransp profile image
rajendransp •

this helped me solve the problem. Thanks