6

It seems impossible to access USB devices in Docker on MacOS

 2 years ago
source link: https://jyzhu.top/It-seems-impossible-to-access-USB-devices-in-Docker-on-MacOS/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

It seems impossible to access USB devices in Docker on MacOS

2022-05-16Computer Notes

Counter not initialized! More info at console err msg. 649 1 分钟

According to https://dev.to/rubberduck/using-usb-with-docker-for-mac-3fdd, it seems impossible to forward USB to a Docker container on MacOS, coz the Docker is running in a virtual environment via hyperkit.

First of all, ports of the host (i.e., MacOS) cannot be directly accessed by any virtual environment (i.e., Docker) on it. So, "you first have to expose it to the virtual machine where Docker is running". However, Docker is running on hyperkit, which doesn't support usb forwarding.

The author provided another way to do it, that is to usedocker-machine, which uses a Virtualbox VM to host the dockerd daemon, to replace the original docker. Then... why bother still using Docker, instead of just using Virtualbox to run the seperated environment?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK