- vscode插件安装:
- Docker
- Remote-Containers
- Docker Compose
- c/c++
- c/c++ clang command adapter
- c++ intellisense
- CMake
- CMake Tools
- 系统软件安装
- nvidia docker
- docker compose
-
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
-
sudo chmod +x /usr/local/bin/docker-compose
-
- docker-compose.yml配置
-
version: "3" services: android_toolchain: image: eureca2020/ubuntu18.04:v1.3 container_name: toolchain tty: true volumes: - /home/eureca/code/test:/opt/project
-
- task.json配置
-
{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "代码全量编译", "type": "shell", "command": "rm -r build; mkdir build; cd build; cmake .. ; make", "group": { "kind": "build", "isDefault": true }, "problemMatcher": [ "$eslint-compact" ] }, { "label": "代码增量编译", "type": "shell", "command": "cd build; cmake .. ; make", "group": { "kind": "build", "isDefault": true }, "problemMatcher": [ "$eslint-compact" ] }, { "label": "make clean", "type": "shell", "command": "make clean", "problemMatcher": [ "$eslint-compact" ] } ] }
-
- launch.json配置
-
{ // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "(gdb) Launch", "type": "cppdbg", "request": "launch", "launchOptionType": "Local", "targetArchitecture": "x86_64", "program": "${workspaceFolder}/build/myModule", // 表示可执行程序所在的路径,其中,${workspaceRoot}表示VScode加载的文件夹的根目录 "args": [], "stopAtEntry": true, "cwd": "${workspaceFolder}", "environment": [], "MIMode": "gdb", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ], "preLaunchTask": "代码全量编译" } ] }
-
vscode+docker开发环境配置
最新推荐文章于 2024-05-21 09:57:43 发布