Skip to content

Commit dfd09f3

Browse files
committed
Add devcontainer configuration for Python 3 with updated features and settings
1 parent 3de15c4 commit dfd09f3

File tree

2 files changed

+63
-15
lines changed

2 files changed

+63
-15
lines changed

.devcontainer/devcontainer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "Python 3",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
7+
"features": {
8+
"ghcr.io/devcontainers/features/python:1": {
9+
"installTools": true,
10+
"version": "latest"
11+
},
12+
"ghcr.io/lentzi90/features/yamlfmt:0": {
13+
"version": "v0.14.0"
14+
},
15+
"ghcr.io/gvatsal60/dev-container-features/pre-commit:1": {}
16+
}
17+
18+
// Features to add to the dev container. More info: https://containers.dev/features.
19+
// "features": {},
20+
21+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
22+
// "forwardPorts": [],
23+
24+
// Use 'postCreateCommand' to run commands after the container is created.
25+
// "postCreateCommand": "pip3 install --user -r requirements.txt",
26+
27+
// Configure tool-specific properties.
28+
// "customizations": {},
29+
30+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
31+
// "remoteUser": "root"
32+
}
Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,36 @@
11
folders:
22
- .devcontainer/devcontainer.json:
33
content: |
4+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
5+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
46
{
5-
"image": "mcr.microsoft.com/vscode/devcontainers/python:3",
6-
"settings": {
7-
"terminal.integrated.shell.linux": "/bin/bash"
8-
},
9-
"extensions": [
10-
"dbaeumer.vscode-eslint",
11-
"esbenp.prettier-vscode",
12-
"ms-azuretools.vscode-docker",
13-
"ms-kubernetes-tools.vscode-kubernetes-tools",
14-
"ms-python.python",
15-
"ms-vscode-remote.remote-containers",
16-
"redhat.vscode-yaml",
17-
"visualstudioexptteam.vscodeintellicode"
18-
],
19-
"postCreateCommand": "yarn install"
7+
"name": "Python 3",
8+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
9+
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
10+
"features": {
11+
"ghcr.io/devcontainers/features/python:1": {
12+
"installTools": true,
13+
"version": "latest"
14+
},
15+
"ghcr.io/lentzi90/features/yamlfmt:0": {
16+
"version": "v0.14.0"
17+
},
18+
"ghcr.io/gvatsal60/dev-container-features/pre-commit:1": {}
19+
}
20+
21+
// Features to add to the dev container. More info: https://containers.dev/features.
22+
// "features": {},
23+
24+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
25+
// "forwardPorts": [],
26+
27+
// Use 'postCreateCommand' to run commands after the container is created.
28+
// "postCreateCommand": "pip3 install --user -r requirements.txt",
29+
30+
// Configure tool-specific properties.
31+
// "customizations": {},
32+
33+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
34+
// "remoteUser": "root"
2035
}
36+

0 commit comments

Comments
 (0)