Mount external drive: Nextcloud image

Hello together,

I would like to ask you whats the best version to mount a external USB-Drive for my nextcloud docker image (Docker) for my raspi3/raspi4.

There are many posts about the usage of a base image of balena… but I have to use the nextcloud image… So I would like to ask you about the best to do in 2023.

  • Use a multistage build and use for example nextcloud as base image (layer 1)?
    => so I have to manually copy all nessessary files inclusive entrypoint.sh from nextcloud image to the
    balena image in a higher layer…
  • manually build some udev rules in my custom nextcloud image?
  • get fstab working in my nextcloud image and use the build in nextcloud entrypoint.sh files…
    => I tried this already but have problems with permissions… entrypoint of nextcloud procedere is not
    able to run as root

I think I need some input if one of this points is the right way, or if there is a other way available…

Thank you!
Alex

Hello @specter456 this is a very good question! Not sure there is an answer that fits all in 2023, it always depends.

I would use your first idea.

BTW not sure what Nextcloud are you using, but you can find here the @klutchell nextcloud application to get inspired GitHub - klutchell/balena-nextcloud: Nextcloud is a safe home for all your data