Exposing SD Card to Custom Application Container

Hello @anthonyabboud,

I think you are on the right path, but need a few small adjustments.

lsblk command while SSH into the device should give the SD card, and a mountpoint. If there isn’t a mount point you should give it one such as /media/usb. the mount command should work here with the same password as your root user. (not in the container)

Depending on how you are running your docker container you should be passing two important flags. --device and --v

if you are running from the command line: (as example)

docker container run -it --device /dev/sda1 -v /media/usb:/media 2535489c55bb /bin/bash

--device /dev/sda1 : lets the container know about the device

-v /media/usb:/media : links the mount points (/media within the container) to the USB mounted at /media/usb.

These flags can also be set in the docker compose file for the correct container.

-Eric