Hi,
When using docker on SBCs with OS on sdcard I usually move the docker to an external disk. Example: https://linuxconfig.org/how-to-move-docker-s-default-var-lib-docker-to-another-directory-on-ubuntu-debian-linux
How can I achieve the same on openwrt?
Thank you
trendy
March 21, 2023, 2:48pm
2
I don't see why not. Since OpenWrt is not using systemd go to /etc/init.d/dockerd
and work your way from there.
Same problem here. Docker is located in
/media/nvme/docker and with some containers it is working flawlessly - maybe because they are small.
So let's check if the config is correct:
root@FriendlyWrt:/tmp/dockerd# cat daemon.json
{ "data-root": "\/media\/nvme\/docker\/", "log-level": "warn", "iptables": true }
This looks good, this is where it should be.
So let's start HA through
root@FriendlyWrt:/# docker run -d --name homeassistant --privileged --restart=unless-stopped -p 8123:8123 -e TZ="Europe/Berlin" -v homeassistant_config:/config --network=host ghcr.io/home-assistant/home-assistant:stable
Which fails with
docker: failed to register layer: ApplyLayer exit status 1 stdout: stderr: open /usr/local/lib/python3.10/site-packages/screenlogicpy/requests/request.py: no space left on device.
See 'docker run --help'.
So if I understand it right, the system is still using /usr/local which is of course on a "small" disk. we see the mem peak here
So I checked
and
In this tutorial, we show the step by step instructions to change Docker's default root directory to another location of your choosing on Linux.
Est. reading time: 3 minutes
but they all don't apply
So right now I have an unused 1TB SSD in the machine (NanoPi R5S with 4GB RAM, 32GB onboard eMMC and 1TB SSD) but I cannot tell the Docker to start the container
Should I create a swap partition? Any recommendation would be highly appreciated!
trendy
April 16, 2023, 6:59pm
4
Is this OpenWrt or FriendlyWrt? If it is the latter, you'd better ask here .
It is FriendlyWRT - my understanding was, that this is based on OpenWRT. Sorry for that.
trendy
April 16, 2023, 7:41pm
6
It is based, but we don't know which alternations they have done to their images.
Would it be better with original OpenWRT? I am not married to FriendlyWRT, so as long as I can run
a routing firewall
Docker for Zigbee2MQTT/MQTT/HA I am happy
the OS on the eMMC
I would switch immediately.
trendy
April 17, 2023, 7:27am
8
I cannot suggest you to switch to OpenWrt, as there is no official image for OpenWrt yet.
FriendlyARM NanoPi R5S The NanoPi R5S (as āR5Sā) is an open source platform designed and developed by FriendlyElec for IoT applications. The R5S includes the Rockchip RK3568B2 CPU, two 2.5Gbit and one 1Gbit Ethernet ports, 2GB or 4GB LPDDR4X RAM,...
There is an unofficial image if you want to try.
1 Like