top | item 42569756

(no title)

jareklupinski | 1 year ago

is there a way to forward usb/serial ports from my local machine to the dev container?

maintaining consistent firmware development environments using containers is a great idea, and current solutions involving proxying the compiled binary work well for flashing quickly, but switching back and forth between UART and Serial Debug is always more convenient when the IDE can handle it all

discuss

order

watermelon0|1 year ago

You mean forwarding to VSCode dev container?

If you are using Docker Engine directly on Linux, you can forward a device to a container via docker-compose `devices` setting.

If you are using Docker Desktop (or similar), there is no native way. However, there are ways to share USB devices via network (USB/IP is an open source implementation of this), in which case you setup server on host device (can be macOS/Windows/Linux), and then run a client software inside a container.

nottorp|1 year ago

I've done linux/arm yocto development from VMs. The best solution to pass usb/serial was still VMWare the last time I had to.

nneonneo|1 year ago

VMWare has an excellent implementation of this which can selectively connect devices to the guest, and it properly remembers the action for each device you connect to your computer.