From 53c216fd07ec47ca0cc7a68d6293a98c9bbb2670 Mon Sep 17 00:00:00 2001 From: Dennis Kempin Date: Fri, 21 Jan 2022 11:07:59 -0800 Subject: [PATCH] Make vscode devcontainer usable The container was pretty much untested. Now that vscode supports dev containers via SSH I got to test this properly. This provides a workable dev environment out of the box. ./tools/presubmit passes and common extensions for rust, python and bash are added. BUG=None TEST=Open in vscode, re-open in dev container. Run ./tools/presubmit Change-Id: I542f3d26c29c4051000e6ec8b81d77d297bcad7d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3402447 Reviewed-by: Daniel Verkamp Tested-by: kokoro Commit-Queue: Dennis Kempin --- .devcontainer/devcontainer.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 851fa44c43..13b8382f69 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,20 @@ { "image": "gcr.io/crosvm-packages/crosvm_dev:latest", "extensions": [ + "matklad.rust-analyzer", + "bungcip.better-toml", + "esbenp.prettier-vscode", + "ms-python.vscode-pylance", + "foxundermoon.shell-format", + "timonwong.shellcheck", + ], + "runArgs": [ + "--privileged", + "--device=/dev/kvm", + "--volume=/dev/log:/dev/log", + "--device=/dev/net/tun", + "--device=/dev/vhost-net", + "--device=/dev/vhost-vsock", + "--mount=type=tmpfs,destination=/tmp", ] }