| // See |
| // |
| // - https://code.visualstudio.com/docs/remote/containers |
| // - https://code.visualstudio.com/docs/remote/devcontainerjson-reference |
| { |
| // Do not modify manually. This value is automatically updated by ./scripts/docker_build . |
| "image": "sha256:0eaee35dde1820758b59c6c92069e1b23f236d74120e19168134380cd4e97f7b", |
| "extensions": [ |
| "13xforever.language-x86-64-assembly", |
| "bazelbuild.vscode-bazel", |
| "bodil.prettier-toml", |
| "bungcip.better-toml", |
| "esbenp.prettier-vscode", |
| "vadimcn.vscode-lldb", |
| "xaver.clang-format", |
| "zixuanwang.linkerscript", |
| "zxh404.vscode-proto3", |
| "rust-lang.rust-analyzer", |
| "reduckted.vscode-gitweblinks", |
| "eamodio.gitlens" |
| ], |
| "mounts": [ |
| // Crosvm wants access to syslog. |
| "source=/dev/log,target=/dev/log,type=bind", |
| // Enable Docker-in-Docker by giving the container access to the host docker |
| // daemon. |
| "source=${localEnv:XDG_RUNTIME_DIR}/docker.sock,target=/var/run/docker.sock,type=bind", |
| // The container uses the host docker daemon, so docker commands running in |
| // the container actually access the host filesystem. Thus mount the /tmp |
| // directory as a volume in the container so that it can access the outputs of |
| // docker commands that write to /tmp. |
| "source=/tmp,target=/tmp,type=bind", |
| // Provide readonly access to the kernel image and kernel volumes of the host |
| // to enable virt-make-fs which requires access to a kernel. |
| "source=/boot,target=/boot,type=bind,readonly", |
| "source=/lib/modules,target=/lib/modules,type=bind,readonly" |
| ], |
| "runArgs": [ |
| // Required by the VMM. |
| "--device=/dev/kvm", |
| // In order to access /dev/kvm, our user inside the container needs to be a |
| // member of the group that owns /dev/kvm; the device itself is exposed |
| // inside the container with the same group as outside the container. |
| // Unfortunately this GID can differ between systems and there doesn't seem |
| // to be any good way to determine this dynamically from the host machine. |
| // Thus, hard-code 107 which is the group id used with Debian. If you use a |
| // different distribution, it's highly likely you need to adjust this value |
| // to match your environment. |
| "--group-add=107" |
| ], |
| "settings": { |
| // Use the `rust-analyzer` binary installed in the Docker image. |
| "rust-analyzer.serverPath": "rust-analyzer", |
| // Ensure protobuf generated files are loaded correctly. |
| "rust-analyzer.cargo.loadOutDirsFromCheck": true, |
| // Hide git lens artifacts |
| "gitlens.showWelcomeOnInstall": false, |
| // Hide git lens artifacts |
| "gitlens.showWhatsNewAfterUpgrades": false, |
| // Hide git lens artifacts |
| "gitlens.currentLine.enabled": false, |
| // Hide git lens artifacts |
| "gitlens.codeLens.enabled": false |
| }, |
| // Ensure that the workspace is mounted consistently with the `/docker_run` script. |
| // See https://code.visualstudio.com/docs/remote/containers-advanced#_changing-the-default-source-code-mount. |
| "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=delegated", |
| "workspaceFolder": "/workspace", |
| // We do not need to fix the UID when running in rootless Docker. |
| "updateRemoteUserUID": false |
| } |