Docker报swap限制警告

发布时间 2023-08-03 15:22:51作者: liuxiaobei556

docker告警

Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.

/etc/default/grub文件末尾添加

vi /etc/default/grub
...
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

更新grub,重启服务器

update-grub
reboot