VSCode远程容器-扩展未使用docker-compose安装在开发容器上

时间:2019-05-05 13:52:41

标签: docker visual-studio-code vscode-remote

我无法使用“ Remote-Containers”将扩展安装在dev容器中。我不知道这是错误,我的配置错误还是预期的行为。下面是我当前的配置,两个文件都位于项目的根文件夹中。

docker-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中列出的扩展列表是我想安装在dev容器中的扩展列表。任何帮助表示赞赏!

0 个答案:

没有答案