配置阿里云的docker镜像仓库,可以加速下载
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://jarp5cr2.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
每次DockerFIle比较烦,特别是一些特殊的应用,有些配置要改什么的,有没有想过将Image保存起来,下次直接启动他,github速度太慢,试试阿里云的吧
1、登陆
sudo docker login --username=jarp5cr2@domain.com registry.cn-shanghai.aliyuncs.com
2、给Image打个Tag
docker tag 2888deb59dfc registry.cn-shanghai.aliyuncs.com/jarp5cr2/rabbitmq:3.7.7-management
3、丢阿里云上去
docker push registry.cn-shanghai.aliyuncs.com/jarp5cr2/rabbitmq:3.7.7-management
4、坐等镜像上传完成,然后在另外一台机器登陆,然后下载
sudo docker login --username=jarp5cr2@gmail.com registry.cn-shanghai.aliyuncs.com
sudo docker pull registry.cn-shanghai.aliyuncs.com/jarp5cr2/rabbitmq:3.7.7-management
以后就能到处浪了!~