Add example runArgs to devcountainer to access serial port.

This commit is contained in:
jdiamond 2024-07-25 04:47:44 +00:00
parent 3615ab535b
commit 02cae2e61e

View File

@ -12,6 +12,13 @@
}
},
// To give the container access to a device serial port, you can uncomment one of the following lines.
// You can explicitly forward the port. The docker user needs to be able to access this port, and this will only work
// if the device is plugged in from the start without reconnecting.
// "runArgs": ["--device=/dev/ttyACM0", "--group-add", "dialout"],
// Alternatively, you can give more comprehensive access to the host system.
// "runArgs": ["--privileged", "-v", "/dev/bus/usb:/dev/bus/usb", "--group-add", "dialout"],
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",