Skip to content

Commit 10fdf46

Browse files
committed
Clarify security implicatations.
1 parent 02cae2e commit 10fdf46

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.devcontainer/devcontainer.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,16 @@
1313
},
1414

1515
// 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.
16+
//
17+
// You can explicitly just forward the port you want to connect to. Replace `/dev/ttyACM0` with the serial port for
18+
// your device. This will only work if the device is plugged in from the start without reconnecting. Adding the
19+
// `dialout` group is needed if read/write permisions for the port are limitted to the dialout user.
1820
// "runArgs": ["--device=/dev/ttyACM0", "--group-add", "dialout"],
19-
// Alternatively, you can give more comprehensive access to the host system.
21+
//
22+
// Alternatively, you can give more comprehensive access to the host system. This will expose all the host devices to
23+
// the container. Adding the `dialout` group is needed if read/write permisions for the port are limitted to the
24+
// dialout user. This could allow the container to modify unrelated serial devices, which would be a similar level of
25+
// risk to running the build directly on the host.
2026
// "runArgs": ["--privileged", "-v", "/dev/bus/usb:/dev/bus/usb", "--group-add", "dialout"],
2127

2228
// Set *default* container specific settings.json values on container create.

0 commit comments

Comments
 (0)