Torizon Docker Container USB automount

I am trying to automount USB devices inside a torizon/arm64v8-debian-base Docker container. So far, I have been struggling to even manually mount usb devices. Binding the /devdirectory:

docker run -it --rm -v /dev:/dev torizon/arm64v8-debian-base
mount /dev/sda .

Results in mount: /: permission denied.. I have to start the container with --privileged flag to make manually mounting work. Next, I tried to install udev for automounting. This results in:

The group `input' already exists and is not a system group. Exiting.

Any help would be appreciated.

Greetings @mjs,

I assume your end goal here is to install udev in a container and then create some kind of udev rule to perform the auto-mount? (Correct me if I’m wrong)

As a suggestion perhaps it would be easier to create a udev rule to auto-mount your USB device on the base TorizonCore system (outside of the container). Then from there you could bind-mount whatever directory you mounted the USB to, inside the container.

Unless there is a specific reason you want to auto-mount in the container itself?

Best Regards,


Thanks for the response. What I was actually trying to achieve, was to install udiskie to handle automounting, and udev is a dependency for udiskie and udisks2. I am not familiar with udev at all so this would have simplified the process for me.

We are developing a prototype device to be used by customers and the idea would be to offer easy and simple updates for these devices. The reason I wanted to keep everything within a Docker container was to simplify the whole update process by just updating a container if we want to deliver a new version of udiskie, for example. Additionally, the container has the apt package manager for installing udiskie.

If there is no other way, I may then need to get more familiar with udev, and handle things at host OS level.

I guess I have some further questions I might have that would help narrow down a solution.

Are there any other features of udiskie that you require or is it just the auto-mounting of USB drives that you need?

During the use of your product will USB drives be removed and inserted through it’s use or is it just one time at the start?

Either way though I think it’d be best to handle the mounting of the USB drives outside of the container. Though it probably is still possible from within the container if the situation truly requires it.

Best Regards,

Currently, udiskie is used just for automounting.

During normal use, users may insert and remove USB drives anytime.

I was already able to implement a simple udev rule to automount USB drives and that is probably good enough for us. I am still new to Toradex and Torizon, so the only thing to consider is how to deliver and apply updates to files outside the container in a simple and predictable way. I am sure this is possible, so handling mounting outside the container seems like the right way to go.

I’m glad you were able to get started with just udev rules.

As for your follow up question on updates. We are working on a fully fledged update service for Torizon devices.

Currently the project is experimental under our Labs brand as you can see here: Torizon Over-The-Air (OTA)

However we are planning to fully commit to this project and eventually release it as it’s own software product.

Of course there are other OTA update services out there that aren’t Toradex specific.

Either way let me know if you have further questions about our upcoming update offerings.

Best Regards,