自学内容网 自学内容网

WARNING: No swap limit support——查看docker状态时提示警告

环境:Ubuntu 20.04

1、警告详情

执行命令

service docker status

如下图
在这里插入图片描述

2、解决办法

2.1 修改文件

执行命令

vim /etc/default/grub

GRUB_CMDLINE_LINUX中追加cgroup_enable=memory swapaccount=1,如下:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US cgroup_enable=memory swapaccount=1"

保存退出

2.2 更新

sudo update-grub

2.3 重启

reboot

2.4 验证

service docker status

问题解决
在这里插入图片描述


时间: 2024年4月16日


原文地址:https://blog.csdn.net/lxcw_sir/article/details/137824079

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!