Sharing a Named Volume using Samba

Hello, I have a container running on my device that uses a volume named “server_data”. As per the name, the container stores all the files for a server running on it to that volume. I want a separate container to be sharing that same volume over the network using Samba. I’ve tried just using a Debian container to run the Samba server with a custom configuration file, but I can’t figure out how to start the Samba server within the container, as using “systemctl” does not work. After that, I tried just using the “balena-idle” command, hoping the Samba server would start on its own, but to no avail. I don’t know what else to try, and any suggestions are welcome and appreciated. Thanks in advance!

Hi @MarkDev,

you need to call the smbd executable in your docker startup script instead of trying to run it as a service.

Have a look at GitHub - balena-io-playground/balena-samba: Share your USB drive over the network using your IoT device. for some ideas.

Cheers,

Mal.

Thank you so much! That link you sent had all the things I needed to get it running in my container and work the way I intended it to for my specific project!

Cheers!