Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

jingmian】 在 https://github.com/istoreos/istoreos/issues/1757 发布:

(1) 具体问题

BusyBox v1.35.0 (2023-07-05 07:27:39 UTC) built-in shell (ash)

                                                        
   ▀     ▄▄▄▄    ▄                          ▄▄▄▄   ▄▄▄▄ 
 ▄▄▄    █▀   ▀ ▄▄█▄▄   ▄▄▄    ▄ ▄▄   ▄▄▄   ▄▀  ▀▄ █▀   ▀
   █    ▀█▄▄▄    █    █▀ ▀█   █▀  ▀ █▀  █  █    █ ▀█▄▄▄ 
   █        ▀█   █    █   █   █     █▀▀▀▀  █    █     ▀█
 ▄▄█▄▄  ▀▄▄▄█▀   ▀▄▄  ▀█▄█▀   █     ▀█▄▄▀   █▄▄█  ▀▄▄▄█▀
                                                        
                                  Powered by OpenWRT    
 -------------------------------------------------------
 iStoreOS 22.03.7, 2024080210
 -------------------------------------------------------
root@iStoreOS:~# /etc/init.d/dockerd --help
Syntax: /etc/init.d/dockerd [command]

Available commands:
        start           Start the service
        stop            Stop the service
        restart         Restart the service
        reload          Reload configuration files (or restart if service does not implement reload)
        enable          Enable service autostart
        disable         Disable service autostart
        enabled         Check if service is started on boot
        uciadd          <interface> <device> <zone> Add docker bridge configuration to network and firewall uci config
        ucidel          <interface> <device> <zone> Delete docker bridge configuration from network and firewall uci config
        running         Check if service is running
        status          Service status
        trace           Start with syscall trace
        info            Dump procd service info

root@iStoreOS:~# /etc/init.d/dockerd enable
root@iStoreOS:~# /etc/init.d/dockerd status
running
root@iStoreOS:~# docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
root@iStoreOS:~# ls -l /var/run
drwxr-xr-x    2 nobody   nogroup         80 Aug  8 16:39 avahi-daemon
drwxr-xr-x    2 root     root            80 Aug  8 16:41 blkid
-rw-r--r--    1 root     root          4268 Aug  8 16:39 config.md5
-rw-r--r--    1 root     root             6 Aug  8 16:40 crond.pid
drwxr-xr-x    2 root     root            60 Aug  8 16:39 dbus
-rw-r--r--    1 root     root             5 Aug  8 16:39 dbus.pid
drwxr-xr-x    2 root     root            80 Aug  8 16:40 ddns
drwxr-xr-x    2 dnsmasq  dnsmasq         60 Aug  8 16:40 dnsmasq
drwx------    3 root     root            60 Aug  8 16:40 docker
srw-rw----    1 root     docker           0 Aug  8 16:40 docker.sock
-rw-r--r--    1 root     root             5 Aug  8 16:39 dropbear.1.pid
-rw-r--r--    1 root     root             0 Aug  8 16:39 fanTP
-rw-------    1 root     root             0 Aug  8 16:39 fw3.lock
-rw-r--r--    1 root     root          1375 Aug  8 16:39 fw3.state
drwxr-xr-x    2 network  network         60 Aug  8 16:39 hostapd
srwxr-xr-x    1 root     root             0 Aug  8 16:39 linkease.sock
drwxr-xr-x    2 root     root            80 Aug  8 16:39 mdadm
drwxr-xr-x    2 root     root            80 Aug  8 16:39 modemmanager
drwxr-xr-x    2 root     root            60 Aug  8 16:39 mount
-rw-r--r--    1 root     root             6 Aug  8 16:39 nmbd.pid
drwxr-xr-x    2 root     root           100 Aug  8 16:39 ota
drwxr-xr-x    2 root     root            60 Aug  8 16:39 quickstart
-rw-r--r--    1 root     root             6 Aug  8 16:39 rpc.statd.pid
drwxr-x---    2 rpc      root            40 Aug  8 16:39 rpcbind
-r--r--r--    1 root     root             0 Aug  8 16:39 rpcbind.lock
srw-rw-rw-    1 root     root             0 Aug  8 16:39 rpcbind.sock
drwx------    2 root     root            40 Aug  8 16:39 rpcd
drwxr-xr-x    4 root     root            80 Aug  8 16:39 samba
-rw-------    1 root     root             6 Aug  8 16:39 sm-notify.pid
-rw-r--r--    1 root     root             6 Aug  8 16:39 smbd.pid
-rw-r--r--    1 root     root             0 Aug  8 16:39 trelay.active
drwxr-xr-x    2 ubus     ubus            60 Aug  8 16:39 ubus
drwxr-xr-x    3 root     root            80 Aug  8 16:39 unishare
drwx------    3 root     root            60 Aug  8 16:40 user
drwxr-xr-x    2 network  network         60 Aug  8 16:39 wpa_supplicant
-rw-------    1 root     root             0 Aug  8 16:39 xtables.lock
drwxr-xr-x    2 root     root           140 Aug  8 16:39 zerotier

root@iStoreOS:~# docker version
Client:
 Version:           20.10.22
 API version:       1.41
 Go version:        go1.19.13
 Git commit:        3a2c30b
 Built:             Thu Aug  1 21:34:17 2024
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
root@iStoreOS:~# 

A:

(2) 路由器型号和固件版本

X86 j4105. iStoreOS 22.03.7

(3) 详细日志和/或截图

通过top命令查不到有任何docker的字眼,但是通过命令启动,却提示成功