菜单

eya46
eya46
发布于 2023-10-18 / 8 阅读
0
0

宝塔面板docker安装问题

问题

宝塔左侧docker栏 -> 点击 点击安装

结果安装成功后,依旧显示当前未安装docker或docker-compose,点击安装

重试了几次,点击安装,依旧这样.

找问题

在命令行试了下,docker可用,docker-compose却不行

执行了下 whereis docker-compose

armbian:~:# whereis docker-compose
docker-compose: /usr/bin/docker-compose

不知道是啥问题,有docker-compose但用不了

再去看了下宝塔安装软件的执行日志,突然找到这个

curl: (23) Failure writing output to destination
chmod: cannot access '/usr/libexec/docker/cli-plugins/docker-compose': No such file or directory

突然有个想法,把docker-compose复制到这目录会怎么样?

试了下

armbian:~:# cp /usr/bin/docker-compose /usr/libexec/docker/cli-plugins/docker-compose
cp: cannot stat '/usr/bin/docker-compose': No such file or directory

armbian:bin:# cd /usr/bin
armbian:bin:# ls -l | grep docker-
lrwxrwxrwx 1 root root          46 Oct 18 16:37 docker-compose -> /usr/libexec/docker/cli-plugins/docker-compose
-rwxr-xr-x 1 root root     2246502 Sep  4 20:32 docker-proxy
armbian:bin:# cd /usr/libexec/docker/cli-plugins/
cd: no such file or directory: /usr/libexec/docker/cli-plugins/

233,原来是没有这文件

解决问题

那就自己下一个

cd /usr/libexec/docker
mkdir cli-plugins
cd cli-plugins
wget -O docker-compose https://github.com/docker/compose/releases/download/v2.22.0/docker-compose-linux-aarch64
chmod +x docker-compose

再试了下docker-compose,行了,耶耶耶

再访问宝塔的docker面板,这下OK了


评论