Visual studio code VisualStudio在线容器
我正在尝试使用VisualStudio代码创建远程环境。我想为我的容器创建一个自定义dockerfile。我一直在遵循指南: 我正在使用dockerFile引用(但我也尝试了图像引用)。每次我都会得到相同的默认容器 这是我的.devcontainer.json文件:Visual studio code VisualStudio在线容器,visual-studio-code,vscode-remote,Visual Studio Code,Vscode Remote,我正在尝试使用VisualStudio代码创建远程环境。我想为我的容器创建一个自定义dockerfile。我一直在遵循指南: 我正在使用dockerFile引用(但我也尝试了图像引用)。每次我都会得到相同的默认容器 这是我的.devcontainer.json文件: { "name": "Python 3", "context": "..", "dockerFile": "Dockerfile", // Use 'settings' to set *defaul
{
"name": "Python 3",
"context": "..",
"dockerFile": "Dockerfile",
// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.pylintPath": "/usr/local/bin/pylint"
},
// Use 'appPort' to create a container with published ports. If the port isn't working, be sure
// your server accepts connections from all interfaces (0.0.0.0 or '*'), not just localhost.
// "appPort": [ 9000 ],
// Install flask and any other dependencies
"postCreateCommand": "sudo pip install -r requirements.txt",
// Comment out next line to run as root
"remoteUser": "vscode",
// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"ms-python.python",
"quicktype.quicktype"
]
}
配置的其余部分似乎正常工作——扩展正常,安装了requirements.txt。但是dockerfile似乎是忽略或错误-但我不知道在哪里可以看到任何错误日志
我也试着指出这个回购协议:但同样的事情也发生了。该dockerfile指向python:3,该版本应为3.8.1版-但环境中的版本为3.8.0,这是默认映像。已解决-此功能尚未发布。这一次,文档似乎领先于代码。