How to Fix “No memory limit support” for Docker in Raspberry Pi
Most of us have been in the position where you want to run docker in Raspberry Pi and create a docker swarm cluster or Kubernetes cluster. When it comes to docker installation, docker info command gives you warning messages, hence the cluster installation gets stuck.
docker info
Throws 0ne of the following warnings or all of them
WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
Enable cgroups
To enforce limits to the containers, it is required that cgroup is enabled. So the kernel needs to boot up with cgroup support.
In Raspberry Pi running Ubuntu Server 64 Bit , add the following content to /boot/firmware/cmdline.txt
nano /boot/firmware/cmdline.txt
cgroup_enable=memory swapaccount=1 cgroup_memory=1 cgroup_enable=cpuset
Save the file with ctrl+o, ctrl+x, Enter.
Reboot System
To load these new configurations, reboot the system
sudo reboot now
After reboot, the docker info command should not show any warning messages.
Enjoy!