the --volume option seems not enough to dynamically mount and unmount USB drives and sticks in a docker containers when they are physically plugged and unplugged as mentioned here on serverfault.com. Therefore it is possible to do that using the more powerful --mount option this way:
docker run --rm -it --privileged --mount type=bind,source=/var/rootdirs/media,target=/disks,bind-propagation=shared torizon/debian:$CT_TAG_DEBIAN /bin/bash
Unfortunately I am not able to configure that option in VS Code. On February I asked an other question about other simpler docker options and the answer was general enough to solve similar issues, but now I am blocked again because the option argument is more complex, being a list of Mounts objects, according to the documentation (link).
Some unsuccessful attempts results in similar config.yaml
the described method helped me to see the flash drive, but it is connected only with “root” rights and therefore I cannot write to it. Can you advise me how to get the right one for the “user”? Thank you
I have TorizonCore 5.7.0+build.17, I use VS Code with the Toradex Extension and I found that the propagation: “shared” flag from config.yaml is not propagated to the resulting config.v2.json in the appropriate container.