Skip to content

Commit 188d32a

Browse files
Update devcontainer.json
1 parent 0170c0f commit 188d32a

1 file changed

Lines changed: 37 additions & 39 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,66 @@
11
{
22
"name": "Python Flask Development Container",
3-
"image": "mcr.microsoft.com/devcontainers/universal:2",
3+
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
4+
"features": {
5+
"ghcr.io/devcontainers/features/python:1": {}
6+
},
47
"hostRequirements": {
58
"cpus": 4
69
},
710
"waitFor": "onCreateCommand",
8-
"updateContentCommand": "pip install -r requirements.txt",
9-
"postCreateCommand": "",
10-
"postAttachCommand": {},
11-
"portsAttributes": {
12-
"5000": {
13-
"label": "Application",
14-
"onAutoForward": "openPreview"
15-
}
16-
},
11+
"updateContentCommand": "",
12+
"postCreateCommand": "pip install -r requirements.txt && apt-get clean && rm -rf /root/.cache/pip",
13+
"postStartCommand": "", // For commands to run each Codespace start
1714
"customizations": {
1815
"vscode": {
1916
"settings": {
2017
"files.autoSave": "onFocusChange",
2118
"editor.formatOnPaste": true,
2219
"editor.formatOnSave": true,
23-
"editor.defaultFormatter": "esbenp.prettier-vscode",
24-
"[python]": {
25-
"editor.defaultFormatter": "ms-python.black-formatter"
26-
},
2720
"editor.fontSize": 18,
21+
"extensions.ignoreRecommendations": true,
22+
"unwantedRecommendations": ["ms-python.vscode-python-envs"],
2823
"terminal.integrated.defaultProfile.windows": "Git Bash",
2924
"window.restoreWindows": "preserve",
3025
"workbench.editorAssociations": {
3126
"*.md": "vscode.markdown.preview.editor"
3227
},
33-
"workbench.colorTheme": "Default Dark+",
34-
"workbench.iconTheme": "vscode-icons",
35-
"github.copilot.enable": {
36-
"python": false,
37-
"html": false,
38-
"css": false,
39-
"SQL": false
40-
}
28+
"workbench.colorTheme": "Default Dark+",
29+
"workbench.iconTheme": "vscode-icons",
30+
"github.copilot.enable": {
31+
"python": false,
32+
"html": false,
33+
"css": false,
34+
"SQL": false
35+
},
36+
"chat.agent.enabled": false
4137
},
4238
"extensions": [
43-
"McCarter.start-git-bash",
44-
"yy0931.vscode-sqlite3-editor",
45-
"medo64.render-crlf",
39+
"bierner.markdown-mermaid",
40+
"bierner.markdown-preview-github-styles",
4641
"ecmel.vscode-html-css",
47-
"ms-python.python",
4842
"esbenp.prettier-vscode",
49-
"oderwat.indent-rainbow",
50-
"ritwickdey.LiveServer",
51-
"tomoki1207.pdf",
52-
"ms-vscode-remote.remote-containers",
53-
"ms-vscode-remote.remote-wsl",
5443
"GitHub.codespaces",
55-
"ms-python.debugpy",
56-
"ms-python.vscode-pylance",
57-
"ms-vscode-remote.remote-wsl",
58-
"ms-azuretools.vscode-docker",
59-
"yahyabatulu.vscode-markdown-alert",
60-
"bierner.markdown-preview-github-styles",
44+
"mathematic.vscode-pdf",
45+
"McCarter.start-git-bash",
6146
"mechatroner.rainbow-csv",
47+
"ms-python.black-formatter",
48+
"ms-python.debugpy",
6249
"ms-python.pylint",
63-
"donjayamanne.python-environment-manager"
50+
"ms-python.python",
51+
"oderwat.indent-rainbow",
52+
"streetsidesoftware.code-spell-checker",
53+
"tal7aouy.icons",
54+
"saeris.markdown-github-alerts",
55+
"yy0931.vscode-sqlite3-editor"
6456
]
6557
}
6658
},
67-
"forwardPorts": [5000]
59+
"forwardPorts": [5000], // Add the port your Flask app runs on, or others as needed
60+
"portsAttributes": {
61+
"5000": {
62+
"label": "Flask App",
63+
"onAutoForward": "openBrowser"
64+
}
65+
}
6866
}

0 commit comments

Comments
 (0)