解决Portainer在Docker更新后无法连接local环境

原因

Docker API更新导致Portainer无法链接local环境,提示Environment local is unreachable

解决方法

方案来自Docker 29 API Changes Breaking Changes

编辑docker.service:

systemctl edit docker.service

添加DOCKER_MIN_API_VERSION字段:

### Anything between here and the comment below will become the contents of the drop-in file

[Service]
Environment=DOCKER_MIN_API_VERSION=1.24

### Edits below this comment will be discarded

重启docker

sudo systemctl restart docker

再次查看Portainer等服务,恢复正常。

posted @ 2025-11-16 02:37  Duckling8113  阅读(491)  评论(0)    收藏  举报