某些原因导致国内现时无法连上docker的仓库,需要更换国内的加速源
很简单
vi /etc/docker/daemon.json [加入以下代码] { "registry-mirrors": ["https://docker.1panel.live"] }
以上的仓库网址随时有可能失效,自己试吧!
保存退出
systemctl daemon-reload systemctl restart docker
测试安装Docker和portainer图形管理界面
apt install docker.io docker-compose docker pull portainer/portainer-ce docker run -d --name portainerUI -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer
打开浏览器访问http://IP:9000 试试
另外一个必需装的容器 Watchtower ,它能监控所有容器升级情况,自动升级到最新版本,看需求使用吧!
docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower 自动清除旧镜像加 --cleanup参数 , 定时运行加 --schedule "0 0 2 * *"参数