我有这个 docker run 命令:
sudo docker run --device=/dev/kvm -it -v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=unix$DISPLAY -v $PWD/../project:/home/project \
-v /mnt/android-dev-3:/home/project/disk \
-v /home/$USER/Android:/home/project/sdk \
-it aosp_builder /bin/bash
我在 devcontainer 中复制它,如下所示:
{
"name": "AOSP development",
"dockerFile": "../docker/Dockerfile",
"extensions": [
"dracula-theme.theme-dracula",
"ms-vscode.cpptools",
"mhutchie.git-graph",
"eamodio.gitlens",
],
"mounts": ["source=/mnt/android-dev-3,target=/home/project/disk,consistency=cached",
"source=/home/${USER}/Android,target=/home/project/sdk,consistency=cached",
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,consistency=cached"],
"containerEnv": {
"DISPLAY": "unix${DISPLAY}",
},
"workspaceFolder": "/home/project"
}
但是--device=/dev/kvm
缺少了。我该如何添加?