Introduction
Coming from Trouble with MicroPython Sandbox setup on Windows, we are looking into how to shift the Unix-based toolchain into a Docker container. The main obstacle here is how to gain access to the UART port the device is connected to.
TLDR;
Currently, this idea will only work on Docker for Linux.
Docker for Windows and macOS don’t provide capabilities for privileged access of UART devices on the host machine within containers.
State of the onion
Others are looking at similar things (2018):
Resources
- Docker - a way to give access to a host USB or serial device? - Stack Overflow
- https://forums.docker.com/t/how-to-expose-host-serial-port-to-container-correctly/81588
- Serial port unavailable under Windows even with --privileged flag · Issue #1018 · docker/for-win · GitHub
- Exposing a tty serial device requires privileged and doesn't work · Issue #900 · docker/for-mac · GitHub