From 6170f158b5cdbb7e07c0fab333562cc57f07e02f Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Thu, 26 Mar 2026 16:20:15 +0100 Subject: [PATCH] don't need --privileged --- .devcontainer/devcontainer.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3a1c2f0548..782a25b15c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,15 +10,19 @@ } }, "runArgs": [ - "--privileged", "--network=host", - "--device=/dev/bus/usb", + // below is the MAJOR version of the device, which is 166 for my device. + "--device-cgroup-rule=c 166:* rmw", + // /dev/serial/by-id/ is the right way of accessing devices, tell PIO to use that. + "-v", "/dev/serial:/dev/serial", + "-v", "/dev/bus/usb:/dev/bus/usb", // arch linux tty* is owned by uucp (986) "--group-add=986", // debian tty* is owned by dialout (20) "--group-add=20" ], "postCreateCommand": { + "mknod": "for minor in `seq 0 9`; do sudo mknod -m 666 /dev/ttyACM$minor c 166 $minor; done", "platformio": "pipx install platformio", "opencode": "curl -fsSL https://opencode.ai/install | bash" }, @@ -44,4 +48,4 @@ ] } } -} \ No newline at end of file +}