Skip to content

Commit b3a691c

Browse files
[devcontainer] Add vscode user to dialout group (project-chip#72208)
Ensures the vscode user can access serial devices inside the container. Without membership in the dialout group, flashing ESP32 targets fails: $ idf.py -p /dev/ttyACM0 flash Error: Invalid value for '-p' / '--port': Path '/dev/ttyACM0' is not readable. Device permissions confirm the issue: $ ls -l /dev/ttyACM0 crw-rw---- 1 root dialout ... And the vscode user is not a member of dialout: $ groups vscode sudo docker Adding the user to the dialout group resolves the flashing failure. Signed-off-by: Martin Flaska <martin.flaska@legrand-ext.com>
1 parent 5a0d516 commit b3a691c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ RUN (getent passwd $USER_UID && userdel -f $(getent passwd $USER_UID | cut -d: -
6161
&& (getent passwd $USERNAME && userdel -f $USERNAME || true) \
6262
&& (getent group $USERNAME && groupdel -f $USERNAME || true) \
6363
&& groupadd -g $USER_GID $USERNAME \
64-
&& useradd --no-log-init -s /bin/bash -u $USER_UID -g $USER_GID -G docker,sudo -m $USERNAME \
64+
&& useradd --no-log-init -s /bin/bash -u $USER_UID -g $USER_GID -G docker,sudo,dialout -m $USERNAME \
6565
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
6666
&& chmod 0440 /etc/sudoers.d/$USERNAME \
6767
&& :

0 commit comments

Comments
 (0)