Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to mount /dev/bus/usb on VSCode's devcontainer for docker?

I did this on my devcontainer.json as specified here:

"mounts": ["source=/dev/bus/usb,target=/dev/bus/usb"]

but I got

[2022-03-05T22:04:50.779Z] docker: Error response from daemon: create /dev/bus/usb: "/dev/bus/usb" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.

It looks to me that /dev/bus/usb is already an absolute path

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You need to specify that this is a bind mount.

"mounts": ["type=bind,source=/dev/bus/usb,target=/dev/bus/usb"]
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading