关于docker镜像
真正能用的(重要)¶
参考:https://www.youtube.com/watch?v=SFMJvuvqPcg
1. 更换可用的镜像源¶
目前可用的镜像源:
https://dockerpull.com
## 建议使用
https://docker.1panel.live
https://dockerproxy.cn
https://docker.hpcloud.cloud
首先 vim /etc/docker/daemon.json
{
"registry-mirrors": ["请替换为您自己的代理服务ip或者域名"]
}
然后重启 docker
sudo systemctl daemon-reload
sudo systemctl restart docker
2. 部署 docker 代理到第三方平台¶
参考:https://github.com/dqzboy/Docker-Proxy
- 选择部署到 Render
-
登录 Render
-
New -> Web Service
- 下一步->Free(免费的)->直接部署
然后会出现部署过程:
- 和第一步一样, 修改镜像源为 镜像加速地址
目前可用的¶
docker-drag
版本不对应
项目地址:https://github.com/NotGlop/docker-drag
环境要求:本地有 python
环境
使用方式:
- 下载到本地
git clone https://github.com/NotGlop/docker-drag.git
- pull 镜像
python docker_pull.py mysql/mysql-server:8.0
- 从
tar
文件中加载镜像
docker load -i library_ubuntu.tar
目前在 windows 中唯一可用的, 但是有的镜像无法下载
也许能用的¶
一些在线工具¶
参考:https://www.hi-linux.com/posts/46425.html
参考:https://blog.csdn.net/cced1934/article/details/137435091
参考:https://www.bilibili.com/read/cv35387254/
阿里云同步镜像(推荐)¶
应该能实现
同步镜像到阿里云
参考一:https://github.com/ikrong/sync-docker-image
同步DockerHub上的镜像仓库到阿里云容器镜像仓库
Docker 的一些服务所在域名被封杀,无法直接访问和拉取镜像。国内的镜像源又宣布停止服务,所以需要一个工具将DockerHub上的镜像同步到阿里云容器镜像仓库。
参考二:https://www.lvbibir.cn/posts/tech/docker-download-foreign-images/
docker 设置代理¶
参考:https://gist.github.com/y0ngb1n/7e8f16af3242c7815e7ca2f0833d3ea6