From ce0246633d11c416ecde5cd002d5c4a073d9175b Mon Sep 17 00:00:00 2001 From: dylif Date: Mon, 30 Sep 2024 20:14:31 -0400 Subject: [PATCH] Add mount for host's udev rules in container This is done to address a problem in the `serialport-rs` library: https://github.com/serialport/serialport-rs/issues/153 Using the `runArgs` property since the `mounts` property doesn't allow specifying `readonly`. --- cargo/.devcontainer/devcontainer.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cargo/.devcontainer/devcontainer.json b/cargo/.devcontainer/devcontainer.json index c9e93e9..66e80d2 100644 --- a/cargo/.devcontainer/devcontainer.json +++ b/cargo/.devcontainer/devcontainer.json @@ -10,6 +10,11 @@ "ESP_BOARD": "{{ mcu }}" } }, + // https://github.com/serialport/serialport-rs/issues/153 + "runArgs": [ + "--mount", + "type=bind,source=/run/udev,target=/run/udev,readonly" + ], "customizations": { "vscode": { "settings": {