Search code examples
dockervisual-studio-code

What happened to my attachment to docker container in VS Code?


I have trouble when I try to attach VS Code to docker. The docker is created by a program used to finish a course named CSCI 0300 by Brown University.

When I do "Attach to Docker" operation, VS Code shows some lines about progress. When appearing such line

"tart: Run in container: (dd iflag=fullblock bs=8192 count=7014 2>/dev/null; dd iflag=fullblock bs=6039 count=1 2>/dev/null) | tar --no-same-owner -xz -C /home/cs300-user/.vscode-server/bin/863d2581ecda6849923a2118d93a088b0745d9d6_1711460417833"

VS Code can't continue to process next step, and shows this

enter image description here

I have tried to give whole home folder(the files are extracted in home folder).Using sudo chmod -R 755 ~


Solution

  • The final reason is that I use the root user to create such files. So reset the WSL and just din't forget to create a normal user account.