我无法使用“远程 - 容器”在开发容器中安装扩展。我不知道这是错误,我的配置不正确,还是预期的行为。下面是我当前的配置,这两个文件都位于项目的根文件夹中。
码头工人-compose.yml
version: "3.7"
services:
api:
image: node:12
restart: always
ports:
- ${API_PORT}:3000
volumes:
- .:/usr/app
- /usr/app/node_modules
working_dir: /usr/app
command: bash -c "yarn && yarn dev"
.devcontainer.json
{
"dockerComposeFile": "docker-compose.yml",
"service": "api",
"workspaceFolder": "/usr/app",
"extensions": [
"eamodio.gitlens",
"formulahendry.auto-rename-tag",
"coenraads.bracket-pair-colorizer-2",
"kumar-harsh.graphql-for-vscode",
"esbenp.prettier-vscode",
"ms-vscode.vscode-typescript-tslint-plugin",
"visualstudioexptteam.vscodeintellicode"
]
}
中列出的扩展列表.devontainer.json
是我想要安装在开发容器中的扩展列表。任何帮助表示赞赏!