0.背景

宝塔面板调试docker时,无聊一直在按它的”启动“和”重启“

然后就报错了:

出错了,[Docker管理器]运行时发生错误!
AttributeError: 'NoneType' object has no attribute 'containers'
REQUEST_DATE: 2022-06-08 15:12:47
 PAN_VERSION: 7.9.2
  OS_VERSION: CentOS  7.5.1804 x86_64(Py3.7.9)
 REMOTE_ADDR: 219.147.28.106
 REQUEST_URI: POST /plugin%3Faction%3Da%26name%3Ddocker%26s%3DGetConList
REQUEST_FORM: {}
  USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36 Edg/102.0.1245.33
Traceback (most recent call last):
  File "class/pluginAuth.py", line 244, in panel.class.pluginAuth.Plugin.exec_fun
  File "/www/server/panel/plugin//docker/docker_main.py", line 57, in GetConList
    for con in self.__docker.containers.list(all=True):
AttributeError: 'NoneType' object has no attribute 'containers'
1.解决办法

登陆到服务器,执行重启docker命令即可。

sudo systemctl daemon-reload
sudo systemctl restart docker

然后就正常打开docker了。

分类: 常见报错