From 02cae2e61ea61a8b6f840a18ef7bacbbfcd0a8d8 Mon Sep 17 00:00:00 2001 From: jdiamond Date: Thu, 25 Jul 2024 04:47:44 +0000 Subject: [PATCH] Add example runArgs to devcountainer to access serial port. --- .devcontainer/devcontainer.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f77dc4de4..b367752d9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -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",