I'm trying to create a remote environment using Visual Studio Code. I would like to create a custom dockerfile for my container. I've been following the guide here: https://learn.microsoft.com/en-gb/visualstudio/online/reference/configuring
I'm using a dockerFile reference (but I've tried the image reference as well). Everytime I get the same default container.
This is my .devcontainer.json file:
{
"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"
]
}
The rest of the config seems to work - the extensions work, the requirements.txt is installed. But the dockerfile seems to be ignores or errors - but I do not know where I can see any error logs.
I've also tried pointing at this repo: https://github.com/microsoft/vscode-remote-try-python but the same thing happens. That dockerfile points to python:3 which should give version 3.8.1 - but the version on the environment is 3.8.0 which is the default image.