|
| 1 | +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: |
| 2 | +// https://github.com/microsoft/vscode-dev-containers/tree/v0.203.0/containers/python-3 |
| 3 | +{ |
| 4 | + "name": "Python 3", |
| 5 | + "runArgs": [ |
| 6 | + "--init" |
| 7 | + ], |
| 8 | + "build": { |
| 9 | + "dockerfile": "Dockerfile", |
| 10 | + "context": "..", |
| 11 | + "args": { |
| 12 | + // Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6 |
| 13 | + // Append -bullseye or -buster to pin to an OS version. |
| 14 | + // Use -bullseye variants on local on arm64/Apple Silicon. |
| 15 | + "VARIANT": "3.10-bullseye", |
| 16 | + // Options |
| 17 | + "NODE_VERSION": "lts/*" |
| 18 | + } |
| 19 | + }, |
| 20 | + // Set *default* container specific settings.json values on container create. |
| 21 | + "settings": { |
| 22 | + "python.pythonPath": "/usr/local/bin/python", |
| 23 | + "python.languageServer": "Pylance", |
| 24 | + "python.linting.enabled": true, |
| 25 | + "python.linting.flake8Enabled": true, |
| 26 | + "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", |
| 27 | + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", |
| 28 | + "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", |
| 29 | + "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", |
| 30 | + "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", |
| 31 | + "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", |
| 32 | + "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", |
| 33 | + "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", |
| 34 | + "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", |
| 35 | + "python.analysis.diagnosticMode": "workspace", |
| 36 | + "files.exclude": { |
| 37 | + "**/.ipynb_checkpoints": true, |
| 38 | + "**/.pytest_cache": true, |
| 39 | + "**/*pycache*": true |
| 40 | + }, |
| 41 | + "python.formatting.provider": "black", |
| 42 | + "python.linting.flake8Args": [ |
| 43 | + "--max-line-length=88", |
| 44 | + "--extend-ignore=E203" |
| 45 | + ], |
| 46 | + "editor.formatOnSave": true, |
| 47 | + "editor.codeActionsOnSave": { |
| 48 | + "source.organizeImports": true |
| 49 | + }, |
| 50 | + "python.sortImports.args": [ |
| 51 | + "--multi-line=3", |
| 52 | + "--trailing-comma", |
| 53 | + "--force-grid-wrap=0", |
| 54 | + "--use-parentheses", |
| 55 | + "--line-width=88", |
| 56 | + ], |
| 57 | + "markdownlint.config": { |
| 58 | + "MD022": false, |
| 59 | + "MD024": false, |
| 60 | + "MD032": false, |
| 61 | + "MD033": false |
| 62 | + } |
| 63 | + }, |
| 64 | + // Add the IDs of extensions you want installed when the container is created. |
| 65 | + "extensions": [ |
| 66 | + "ms-python.python", |
| 67 | + "ms-python.vscode-pylance", |
| 68 | + "ms-azuretools.vscode-docker", |
| 69 | + "donjayamanne.githistory", |
| 70 | + "felipecaputo.git-project-manager", |
| 71 | + "github.copilot-nightly", |
| 72 | + "eamodio.gitlens", |
| 73 | + "davidanson.vscode-markdownlint" |
| 74 | + ], |
| 75 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 76 | + // "forwardPorts": [], |
| 77 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 78 | + // "postCreateCommand": "pip3 install --user -r requirements.txt", |
| 79 | + // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
| 80 | + "remoteUser": "vscode", |
| 81 | + "features": { |
| 82 | + "docker-in-docker": "latest", |
| 83 | + "git": "latest", |
| 84 | + "git-lfs": "latest", |
| 85 | + "github-cli": "latest" |
| 86 | + } |
| 87 | +} |
0 commit comments