azure-databricks-operator/_devcontainer.legacy/devcontainer.json

78 строки
2.5 KiB
JSON

// If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
{
"name": "Go",
"dockerFile": "./Dockerfile",
"workspaceFolder": "/workspace",
"context": "..",
"workspaceMount": "src=${localWorkspaceFolder},dst=/workspace,type=bind",
"runArgs": [
// Mount the env file
"--env-file", "${localWorkspaceFolder}/.devcontainer/.env",
// Mount go mod cache
"-v", "dboperator-gomodcache:/go/pkg",
// Cache vscode exentsions installs and homedir
"-v", "dboperator-vscodecache:/root/.vscode-server",
// Keep command history
"-v", "dboperator-bashhistory:/root/commandhistory",
// Enable security needed for docker
"--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined",
// Mount docker socket for docker builds
"-v", "/var/run/docker.sock:/var/run/docker.sock",
"--network", "host",
"-e GO111MODULE=on",
// Mount azure
"-v", "${env:HOME}${env:USERPROFILE}/.azure:/home/vscode/.azure"
// Optionally mount k8s auth to existing cluster
// "-v", "${env:HOME}${env:USERPROFILE}/.kube:/home/vscode/.kube",
],
"forwardPorts": [8085, 8089, 9090],
"extensions": [
"ms-azuretools.vscode-docker",
"ms-vscode.go",
"ms-python.python",
"humao.rest-client",
"yzhang.markdown-all-in-one"
],
"settings": {
"go.gopath": "/go",
"go.useLanguageServer": true,
"[go]": {
"editor.snippetSuggestions": "none",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
}
},
"gopls": {
"usePlaceholders": true, // add parameter placeholders when completing a function
// Experimental settings
"completeUnimported": true, // autocomplete unimported packages
"watchFileChanges": true, // watch file changes outside of the editor
"deepCompletion": true // enable deep completion
},
"go.toolsEnvVars": {
"GO111MODULE": "on"
},
"yaml.schemas": {
"kubernetes": "*.yaml"
},
"go.lintTool":"golangci-lint",
"go.lintFlags": [
"--fast"
],
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.testing.pytestEnabled": true,
"python.linting.flake8Enabled": true,
"python.linting.lintOnSave": true,
"python.testing.promptToConfigure": false,
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.formatting.provider": "black",
"python.linting.pylintPath": "/usr/local/bin/pylint",
"remote.extensionKind": {
"ms-azuretools.vscode-docker": "workspace"
}
}
}