执行命令docker run -d --restart=always --name portainer -p 9030:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer报错:

解决步骤:

vim /etc/docker/daemon.json

在文档中增加其他镜像源:

{
  "registry-mirrors": ["https://mirror.ccs.tencentyun.com","http://hub-mirror.c.163.com","https://docker.mirrors.tuna.tsinghua.edu.cn","https://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo","https://docker.m.daocloud.io","https://dockerhub.websoft9.com","https://lispy.org","https://docker.xiaogenban1993.com","https://docker.yomansunter.com","https://docker.zhai.cm","https://a.ussh.net","https://hub.rat.dev","https://docker.1ms.run","http://mirror.azure.cn","https://dockerpull.org","https://dockerhub.icu","https://proxy.1panel.live","https://docker.1panel.top","https://docker.ketches.cn"]
}

保存退出,重启docker,systemctl restart docker

使用docker info命令查看配置是否生效。

再次执行docker run -d --restart=always --name portainer -p 9030:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer。

通过http://<your-centos-ip>:9000访问docker管理ui界面

Logo

欢迎加入DeepSeek 技术社区。在这里,你可以找到志同道合的朋友,共同探索AI技术的奥秘。

更多推荐