lisaac / luci-app-dockerman

Docker Manager interface for LuCI
GNU Affero General Public License v3.0
834 stars 233 forks source link

无法连接到docker守护进程(docker daemon),请检查!! #171

Closed cyclc77 closed 1 year ago

cyclc77 commented 1 year ago

无法连接到docker守护进程(docker daemon),请检查!!

版本信息:

root@OpenWrt:~# docker info
Client:
 Version:    24.0.2
 Context:    default
 Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info

目标平台 x86/64 固件版本 OpenWrt 23.05-SNAPSHOT r23282-57e7188e63 / LuCI openwrt-23.05 branch git-23.189.73029-ac423e9 内核版本 5.15.120

root@OpenWrt:~# dockerd -D
................
failed to start daemon: Devices cgroup isn't mounted

在软件里卸载 cgroupfs-mount 重启软件会解决

在Makefile文件中修改

include $(TOPDIR)/rules.mk

LUCI_TITLE:=LuCI Support for docker
LUCI_DEPENDS:=@(aarch64||arm||x86_64) \
    +luci-compat \
    +luci-lib-docker \
    +luci-lib-ip \
    +docker \
    +dockerd +cgroupfs-mount \ #这个cgroupfs-mount会导致出错,删除后make menuconfig取消勾选
    +ttyd
LUCI_PKGARCH:=all

PKG_LICENSE:=AGPL-3.0
PKG_MAINTAINER:=lisaac <lisaac.cn@gmail.com> \
        Florian Eckert <fe@dev.tdt.de>

PKG_VERSION:=v0.5.26

include $(TOPDIR)/feeds/luci/luci.mk
JKSTAFF commented 1 year ago

存在相同问题,感谢解决方法

lisaac commented 1 year ago

https://github.com/lisaac/luci-app-dockerman/commit/3e98bd7cd5d044e133c3806099f8891723c1575b