-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevcontainer.json
More file actions
39 lines (34 loc) · 1.25 KB
/
devcontainer.json
File metadata and controls
39 lines (34 loc) · 1.25 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
{
"name": "khs-python-example",
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
// Install uv on container create, then sync deps. Subsequent rebuilds
// are cached. The Airflow deps install fine here because the container
// is Linux — no Windows caveat to worry about.
"postCreateCommand": "curl -LsSf https://astral.sh/uv/install.sh | sh && /home/vscode/.local/bin/uv sync",
// After dep install, source uv onto PATH for every new shell.
"postStartCommand": "echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc",
// Expose the FastAPI port to your host browser.
"forwardPorts": [8000],
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"charliermarsh.ruff",
"tamasfe.even-better-toml",
"hashicorp.terraform"
],
"settings": {
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
}
}
}
},
// Run as the non-root `vscode` user that the base image ships with.
"remoteUser": "vscode"
}