Solution to VS Code Codespaces Container is not running or /tmp Permission Denied error.

I tried to open a VS Code Codespace devcontainer and got these errors:

  1. Start: Run: docker ps -q -a --filter label=vsch.local.folder=d:\OneDriveMS\code\GitHub\jongio\memealyzer2 --filter label=vsch.quality=insider mount: /tmp: permission denied.
  2. Error response from daemon: Container 18cc94d100c2bed7387c8e0d2c47fb8d730c18e029358ab7818e3203c27a8fde is not running

Solution:

Open devcontainer.json and add --privileged to runArgs

{
	"runArgs": [
		"--cap-add=SYS_PTRACE",
		"--security-opt",
		"seccomp=unconfined",
		"--privileged"
	],
}

Reopen in the container and it should work.

jon