|
5 | 5 | "context": "..", |
6 | 6 | "args": { |
7 | 7 | // Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9 |
8 | | - "VARIANT": "3", |
9 | | - // Options |
10 | | - "INSTALL_NODE": "true", |
11 | | - "NODE_VERSION": "lts/*" |
| 8 | + "VARIANT": "3" |
12 | 9 | } |
13 | 10 | }, |
14 | 11 |
|
15 | | - // Set *default* container specific settings.json values on container create. |
16 | | - "settings": { |
17 | | - "terminal.integrated.shell.linux": "/bin/bash", |
18 | | - "python.pythonPath": "/usr/local/bin/python", |
19 | | - "python.linting.enabled": true, |
20 | | - "python.linting.pylintEnabled": true, |
21 | | - "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", |
22 | | - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", |
23 | | - "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", |
24 | | - "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", |
25 | | - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", |
26 | | - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", |
27 | | - "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", |
28 | | - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", |
29 | | - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint" |
30 | | - }, |
| 12 | + // To give the container access to a device serial port, you can uncomment one of the following lines. |
| 13 | + // Note: If running on Windows, you will have to do some additional steps: |
| 14 | + // https://stackoverflow.com/questions/68527888/how-can-i-use-a-usb-com-port-inside-of-a-vscode-development-container |
| 15 | + // |
| 16 | + // You can explicitly just forward the port you want to connect to. Replace `/dev/ttyACM0` with the serial port for |
| 17 | + // your device. This will only work if the device is plugged in from the start without reconnecting. Adding the |
| 18 | + // `dialout` group is needed if read/write permisions for the port are limitted to the dialout user. |
| 19 | + // "runArgs": ["--device=/dev/ttyACM0", "--group-add", "dialout"], |
| 20 | + // |
| 21 | + // Alternatively, you can give more comprehensive access to the host system. This will expose all the host devices to |
| 22 | + // the container. Adding the `dialout` group is needed if read/write permisions for the port are limitted to the |
| 23 | + // dialout user. This could allow the container to modify unrelated serial devices, which would be a similar level of |
| 24 | + // risk to running the build directly on the host. |
| 25 | + // "runArgs": ["--privileged", "-v", "/dev/bus/usb:/dev/bus/usb", "--group-add", "dialout"], |
31 | 26 |
|
32 | | - // Add the IDs of extensions you want installed when the container is created. |
33 | | - "extensions": [ |
34 | | - "ms-python.python", |
35 | | - "platformio.platformio-ide" |
36 | | - ], |
| 27 | + "customizations": { |
| 28 | + "vscode": { |
| 29 | + "settings": { |
| 30 | + "terminal.integrated.shell.linux": "/bin/bash", |
| 31 | + "python.pythonPath": "/usr/local/bin/python", |
| 32 | + "python.linting.enabled": true, |
| 33 | + "python.linting.pylintEnabled": true, |
| 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 | + }, |
| 44 | + "extensions": [ |
| 45 | + "ms-python.python", |
| 46 | + "platformio.platformio-ide" |
| 47 | + ] |
| 48 | + } |
| 49 | + }, |
37 | 50 |
|
38 | 51 | // Use 'forwardPorts' to make a list of ports inside the container available locally. |
39 | 52 | // "forwardPorts": [], |
40 | 53 |
|
41 | 54 | // Use 'postCreateCommand' to run commands after the container is created. |
42 | | - "postCreateCommand": "npm install", |
| 55 | + "postCreateCommand": "bash -i -c 'nvm install && npm ci'", |
43 | 56 |
|
44 | 57 | // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
45 | 58 | "remoteUser": "vscode" |
|
0 commit comments