Docker:Docker的Run命令使用時報錯


命令報錯:WARNING: Your kernel does not support swap limit capabilities, memory limited without swap.

這是因為宿主機內核的相關功能沒有打開。按照下面的設置就行:

 

step 1:編輯/etc/default/grub文件,將GRUB_CMDLINE_LINUX一行改為GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

step 2:更新 GRUB,即執行$ sudo update-grub(centOS-7使用如下命令:grub2-mkconfig -o /boot/grub2/grub.cfg 或 centos7啟動項丟失則使用grub2-install /dev/sdx來安裝grub2到磁盤啟動區)

step 3: 重啟系統。reboot

 

文章轉載至:https://www.cnblogs.com/zhuochong/p/9728383.htmlhttps://blog.csdn.net/weixin_34279246/article/details/89773568

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM