Running Docker Containers on LibreELEC
Mounting storage
Partition and format your storage device in the usual way. Reboot. When
LibreELEC boots, it will automatically mount the volume somewhere in
/var/media
. Use the mount
command to find it.
Once you know the mount path, create some systemd unit overrides that bind mount the automatic mount path to the path the Docker addon expects the docker storage to be.
mkdir -p /storage/.config/system.d/service.system.docker.service.d
mkdir -p /storage/.config/system.d/docker.service.d
printf '%b' "[Service]\nExecStartPre=/usr/bin/mount --rbind /var/media/sda1-ata-TS512GSSD370_C10 /storage/.kodi/userdata/addon_data/service.system.docker/docker" > /storage/.config/system.d/docker.service.d/mount-sda1.conf
printf '%b' "[Service]\nExecStartPre=/usr/bin/mount --rbind /var/media/sda1-ata-TS512GSSD370_C10 /storage/.kodi/userdata/addon_data/service.system.docker/docker" > /storage/.config/system.d/service.system.docker.service.d/mount-sda1.conf