Full stack remote development environment
Base on vscode-dev-containers image
Plugin
usage
# switch python version
pyenv versions
export PYENV_VERSION=3.10
# use virtualenv, use the linked major version
mkvirtualenv -p /opt/pyenv/versions/3.10/bin/python hello-world
workon hello-world
.envrc
layout virtualenvwrapper hello-world
unset PS1
.vscode/settings.json
{
"python.defaultInterpreterPath": "/root/.virtualenvs/hello-world/bin/python"
}
usage
# switch golang version
gvm list
gvm use go1.17
.envrc
layout gvm go1.17
.vscode/settings.json
{
"go.goroot": "/opt/gvm/gos/go1.17",
"go.gopath": "/opt/gvm/pkgsets/go1.17/global"
}
golang private mod settings
.vscode/settings.json
{
"go.goroot": "/opt/gvm/gos/go1.15",
"go.gopath": "/opt/gvm/pkgsets/go1.15/global",
"go.toolsEnvVars": {
"GOPROXY": "https://athens-proxy.townsy.io,direct",
"GOPRIVATE": "",
"GONOSUMDB": "townsy.private-github.com"
},
"terminal.integrated.env.linux": {
"GOPROXY": "https://athens-proxy.townsy.io,direct",
"GOPRIVATE": "",
"GONOSUMDB": "townsy.private-github.com"
}
}
install-extension
{
"remote.extensionKind": {
"alefragnani.project-manager": [
"workspace"
]
},
"remote.SSH.defaultExtensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"golang.go",
"TabNine.tabnine-vscode",
"alefragnani.project-manager"
]
}
vscode remote ssh settings
~/.vscode-server/data/Machine/settings.json
use the linked major version
{
"go.goroot": "/opt/gvm/gos/go1.17",
"go.gopath": "/opt/gvm/pkgsets/go1.17/global",
"go.toolsEnvVars": {
"GOBIN": "/opt/go/bin"
},
"python.linting.flake8Path": "/usr/local/bin/flake8",
"python.linting.flake8Args": [
"--max-line-length=119"
],
"python.formatting.blackPath": "/usr/local/bin/black",
"python.formatting.blackArgs": [
"--line-length=119"
],
"python.sortImports.path": "/usr/local/bin/isort",
"python.sortImports.args": [
"--line-length=119"
],
"python.terminal.activateEnvironment": false,
"git.ignoredRepositories": [
"/opt/pyenv"
],
"projectManager.groupList": true,
"projectManager.git.maxDepthRecursion": 4,
"projectManager.git.baseFolders": [
"/data/repos"
]
}
error log:
zsh: bad math expression: operand expected at `*100000 + ...'
solution: enable useLocalServer
{
"remote.SSH.useLocalServer": true
}
maybe have non-Windows SSH installed issue, just ignore
Content type
Image
Digest
sha256:8f238ff4c…
Size
1.2 GB
Last updated
28 days ago
docker pull ifooth/devcontainer