|
1 | 1 | { |
2 | 2 | "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 | + }, |
4 | 7 | "hostRequirements": { |
5 | 8 | "cpus": 4 |
6 | 9 | }, |
7 | 10 | "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 |
17 | 14 | "customizations": { |
18 | 15 | "vscode": { |
19 | 16 | "settings": { |
20 | 17 | "files.autoSave": "onFocusChange", |
21 | 18 | "editor.formatOnPaste": true, |
22 | 19 | "editor.formatOnSave": true, |
23 | | - "editor.defaultFormatter": "esbenp.prettier-vscode", |
24 | | - "[python]": { |
25 | | - "editor.defaultFormatter": "ms-python.black-formatter" |
26 | | - }, |
27 | 20 | "editor.fontSize": 18, |
| 21 | + "extensions.ignoreRecommendations": true, |
| 22 | + "unwantedRecommendations": ["ms-python.vscode-python-envs"], |
28 | 23 | "terminal.integrated.defaultProfile.windows": "Git Bash", |
29 | 24 | "window.restoreWindows": "preserve", |
30 | 25 | "workbench.editorAssociations": { |
31 | 26 | "*.md": "vscode.markdown.preview.editor" |
32 | 27 | }, |
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 |
41 | 37 | }, |
42 | 38 | "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", |
46 | 41 | "ecmel.vscode-html-css", |
47 | | - "ms-python.python", |
48 | 42 | "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", |
54 | 43 | "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", |
61 | 46 | "mechatroner.rainbow-csv", |
| 47 | + "ms-python.black-formatter", |
| 48 | + "ms-python.debugpy", |
62 | 49 | "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" |
64 | 56 | ] |
65 | 57 | } |
66 | 58 | }, |
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 | + } |
68 | 66 | } |
0 commit comments