docker 配置 阿里云镜像加速器
1、简介
为什么使用阿里云镜像加速器?
通常在国内使用Docker,是需要从Docker官网去拉取镜像的,但是官网是在国外的, 所以下载非常慢,或者都下载不了,总是报timeout连接失败错误,因此需要配置镜像的下载,
这个是docker操作首先要做的事情,通常使用以下两种方式。
2、、登录 阿里云
https://promotion.aliyun.com
注册或使用 淘宝账号登录
3、主机上 创建 文件 vi /etc/docker/daemon.json
黏贴下内容
{ "registry-mirrors": ["https://jupy3f13.mirror.aliyuncs.com"] }
4、重启 docker
daemon-reload
restart docker
5、验证 加速器地址释放修改
docker info
6、执行 hello-world
docker run hello-world
docker run hello-world Unable to find image 'hello-world:latest' locally # 本地没有 hello-world 镜像,需要到阿里云镜像下载 latest: Pulling from library/hello-world 0e03bdcc26d7: Pull complete Digest: sha256:6a65f928fb91fcfbc963f7aa6d57c8eeb426ad9a20c7ee045538ef34847f44f1 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/
7 、docker 执行流程
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下