Skip to content

Commit 02cae2e

Browse files
committed
Add example runArgs to devcountainer to access serial port.
1 parent 3615ab5 commit 02cae2e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
}
1313
},
1414

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

0 commit comments

Comments
 (0)