#visual-studio-code #vscode-remote
#visual-studio-code #vscode-remote
Вопрос:
У меня есть .devcontainer
файл, который извлекает образ docker и устанавливает расширения.
Однако расширения устанавливаются только в VS Code, А НЕ в VS Code Insiders. Мне было интересно, может ли кто-нибудь помочь мне с этим.
VS Code Insiders, расширение не установлено
VS Code, все установленные расширения
Мой .devcontainer
файл выглядит следующим образом (я только что удалил то, что монтирую). Кстати, я не использую a dockerfile
в этой настройке.
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.128.0/containers/docker-existing-dockerfile
{
"name": "parallel_env",
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"image": "neuromechanist/emg_processing:v1.0",
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": null
},
// argumnets to add to docker run
"runArgs": ["--memory=64g","--shm-size=128g"],
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-vscode.azure-account",
"ms-kubernetes-tools.vscode-aks-tools",
"mindaro.mindaro",
"googlecloudtools.cloudcode",
"streetsidesoftware.code-spell-checker",
"ms-azuretools.vscode-docker",
"mindaro-dev.file-downloader",
"github.vscode-pull-request-github",
"eamodio.gitlens",
"ms-kubernetes-tools.vscode-kubernetes-tools",
"ms-vsliveshare.vsliveshare",
"gimly81.matlab",
"ms-python.vscode-pylance",
"ms-python.python",
"visualstudioexptteam.vscodeintellicode",
"redhat.vscode-yaml"],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8265, 8266, 8267, 8268, 8269],
// "workspaceFolder": "/workspace",
// "workspaceMount": "source=remote-workspace,target=/workspace,type=volume"
"mounts": [ ]
// Uncomment the next line to run commands after the container is created - for example installing curl.
// "postCreateCommand": "apt-get update amp;amp; apt-get install -y curl",
// Uncomment when using a ptrace-based debugger like C , Go, and Rust
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
}
Комментарии:
1. Я думаю, нам нужно увидеть ваш dockerfile и файлы, которые вы копируете, и куда они помещаются
2. Спасибо @Samathingamajig, я добавил свой
.devcontaner
. Я не использую dockerfile. Я напрямую извлекаю изображение.devcontainer
. Это было то же самое, когда у меня тоже был dockerfile.