Skip to content

Commit 36ba843

Browse files
Create devnew.py
1 parent a71618f commit 36ba843

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.devcontainer/devnew.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "Python 3",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": "..",
6+
"args": {
7+
// Update 'VARIANT' to pick a Python version: 3, 3.11, 3.10, 3.9, 3.8
8+
// Append -bullseye or -buster to pin to an OS version.
9+
// Use -bullseye variants on local on arm64/Apple Silicon.
10+
"VARIANT": "3.12-bookworm"
11+
}
12+
},
13+
14+
"postCreateCommand": "zsh .devcontainer/post_install",
15+
16+
// Configure tool-specific properties.
17+
"customizations": {
18+
// Configure properties specific to VS Code.
19+
"vscode": {
20+
// Set *default* container specific settings.json values on container create.
21+
"settings": {
22+
"python.defaultInterpreterPath": "/usr/local/bin/python",
23+
"python.linting.enabled": true,
24+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
25+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
26+
"terminal.integrated.defaultProfile.linux": "zsh"
27+
},
28+
29+
// Add the IDs of extensions you want installed when the container is created.
30+
"extensions": [
31+
"ms-python.python",
32+
"ms-python.vscode-pylance"
33+
]
34+
}
35+
},
36+
37+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
38+
// "forwardPorts": [],
39+
40+
// Use 'postCreateCommand' to run commands after the container is created.
41+
// "postCreateCommand": "pip3 install --user -r requirements.txt",
42+
43+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
44+
"remoteUser": "vscode"
45+
}

0 commit comments

Comments
 (0)