|
| 1 | +// For format details, see https://aka.ms/devcontainer.json. |
| 2 | +{ |
| 3 | + "name": "simple-flask-api-container", |
| 4 | + "image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye", |
| 5 | + |
| 6 | + // See https://containers.dev/implementors/features/ |
| 7 | + "features": { |
| 8 | + "ghcr.io/devcontainers/features/docker-in-docker:2": {}, |
| 9 | + "ghcr.io/azure/azure-dev/azd:latest": {}, |
| 10 | + "ghcr.io/devcontainers/features/azure-cli:1.0.8": {} |
| 11 | + }, |
| 12 | + |
| 13 | + // Configure tool-specific properties. |
| 14 | + "customizations": { |
| 15 | + // Configure properties specific to VS Code. |
| 16 | + "vscode": { |
| 17 | + // Add the IDs of extensions you want installed when the container is created. |
| 18 | + "extensions": [ |
| 19 | + "ms-python.python", |
| 20 | + "ms-python.vscode-pylance", |
| 21 | + "ms-azuretools.vscode-docker", |
| 22 | + "ms-vscode.azurecli", |
| 23 | + "ms-azuretools.vscode-bicep", |
| 24 | + "GitHub.copilot-chat" |
| 25 | + ], |
| 26 | + // Set *default* container specific settings.json values on container create. |
| 27 | + "settings": { |
| 28 | + "python.defaultInterpreterPath": "/usr/local/bin/python", |
| 29 | + "python.linting.enabled": true, |
| 30 | + "python.linting.pylintEnabled": true, |
| 31 | + "python.linting.pylintArgs": [ |
| 32 | + "--disable=C0114,C0115,C0116" |
| 33 | + ], |
| 34 | + "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", |
| 35 | + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", |
| 36 | + "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", |
| 37 | + "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", |
| 38 | + "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", |
| 39 | + "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", |
| 40 | + "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", |
| 41 | + "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", |
| 42 | + "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", |
| 43 | + "python.testing.unittestEnabled": false, |
| 44 | + "python.testing.pytestEnabled": true, |
| 45 | + "workbench.startupEditor": "newUntitledFile" |
| 46 | + } |
| 47 | + } |
| 48 | + }, |
| 49 | + |
| 50 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 51 | + "forwardPorts": [5000], |
| 52 | + |
| 53 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 54 | + "postCreateCommand": "python3 -m pip install -r src/requirements-dev.txt && pre-commit install", |
| 55 | + |
| 56 | + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
| 57 | + "remoteUser": "vscode" |
| 58 | +} |
0 commit comments