-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdevcontainer.json
More file actions
99 lines (99 loc) · 3.81 KB
/
Copy pathdevcontainer.json
File metadata and controls
99 lines (99 loc) · 3.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
// Base image configuration
"name": "dbt-fusion-devcontainer",
"build": {
"dockerfile": "./Dockerfile",
"args": {
"PYTHON_VERSION": "${localEnv:PYTHON_VERSION:3.12}"
}
},
"remoteUser": "vscode",
// Mount user's .dbt/.ssh folders to access profiles.yml and ssh keys
"mounts": [
"source=${localEnv:HOME}/.dbt,target=/home/vscode/.dbt,type=bind", // Need for dbt-fusion and extension authentication
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind" // Mount if git authentication is through SSH keys
],
// Workspace configuration
"workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/${localWorkspaceFolderBasename},type=bind,consistency=cached",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.defaultProfile.linux": "zsh",
"dbt.dbtPath": "/home/vscode/.local/bin/dbt",
"files.associations": {
"*.sql": "sql",
"*.yml": "yaml"
},
"[sql]": {
"editor.defaultFormatter": "dbtLabsInc.dbt",
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.tabSize": 2,
"editor.insertSpaces": true
},
"[yaml]": {
"editor.defaultFormatter": "dbtLabsInc.dbt",
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.tabSize": 2,
"editor.insertSpaces": true
},
"[python]": {
"editor.wordBasedSuggestions": "allDocuments",
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.fixAll": "explicit"
}
},
"yaml.schemas": { // dbt YAML validator using JSON Schema (https://github.com/dbt-labs/dbt-jsonschema)
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/latest/dbt_yml_files-latest.json": [
"/**/*.yml",
"!profiles.yml",
"!dbt_project.yml",
"!packages.yml",
"!selectors.yml",
"!profile_template.yml",
"!package-lock.yml"
],
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/latest/dbt_project-latest.json": [
"dbt_project.yml"
],
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/latest/selectors-latest.json": [
"selectors.yml"
],
"https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/latest/packages-latest.json": [
"packages.yml"
]
}
},
// Identifiers for extensions to install when the container is created
"extensions": [
"ms-python.python", // Python language support
"charliermarsh.ruff", // Ruff linter and formatter
"ms-python.vscode-pylance", // Python language server
"EditorConfig.EditorConfig", // EditorConfig support
"github.vscode-pull-request-github", // GitHub PR support
"visualstudioexptteam.vscodeintellicode", // AI-assisted IntelliSense
"dbtlabsinc.dbt" // Official dbt extension
]
}
},
// Features to automatically install extensions in the container
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"username": "vscode",
"upgradePackages": true
},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.12",
"installTools": true
}
}
}