详细Docker报错以及Docker配置安装Mysql请看下面博客:
如果在我们使用Docker镜像拉取出现下面错误:
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="1">
详细Docker报错以及Docker配置安装Mysql请看下面博客:
如果在我们使用Docker镜像拉取出现下面错误:
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="1">
证明我们的镜像源失效,需要添加额外镜像:
首先使用下面命令进入/etc/docker/daemon.json文件:
sudo vi /etc/docker/daemon.json
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
随后在文件内部修改成下面代码:(阿里云可以不删,但是基本上没什么用,删了也没事)
这里使用的是vi,所以我们点击o就可以开始修改了 ->
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="1"> class="hljs-ln-code"> class="hljs-ln-line">{
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="2"> class="hljs-ln-code"> class="hljs-ln-line"> "dns": ["8.8.8.8", "8.8.4.4"],
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="3"> class="hljs-ln-code"> class="hljs-ln-line"> "registry-mirrors": [
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="4"> class="hljs-ln-code"> class="hljs-ln-line"> "https://docker.registry.cyou",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="5"> class="hljs-ln-code"> class="hljs-ln-line"> "https://docker-cf.registry.cyou",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="6"> class="hljs-ln-code"> class="hljs-ln-line"> "https://dockercf.jsdelivr.fyi",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="7"> class="hljs-ln-code"> class="hljs-ln-line"> "https://docker.jsdelivr.fyi",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="8"> class="hljs-ln-code"> class="hljs-ln-line"> "https://dockertest.jsdelivr.fyi",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="9"> class="hljs-ln-code"> class="hljs-ln-line"> "https://mirror.aliyuncs.com",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="10"> class="hljs-ln-code"> class="hljs-ln-line"> "https://dockerproxy.com",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="11"> class="hljs-ln-code"> class="hljs-ln-line"> "https://mirror.baidubce.com",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="12"> class="hljs-ln-code"> class="hljs-ln-line"> "https://docker.m.daocloud.io",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="13"> class="hljs-ln-code"> class="hljs-ln-line"> "https://docker.nju.edu.cn",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="14"> class="hljs-ln-code"> class="hljs-ln-line"> "https://docker.mirrors.sjtug.sjtu.edu.cn",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="15"> class="hljs-ln-code"> class="hljs-ln-line"> "https://docker.mirrors.ustc.edu.cn",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="16"> class="hljs-ln-code"> class="hljs-ln-line"> "https://mirror.iscas.ac.cn",
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="17"> class="hljs-ln-code"> class="hljs-ln-line"> "https://docker.rainbond.cc"
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="18"> class="hljs-ln-code"> class="hljs-ln-line"> ]
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="19"> class="hljs-ln-code"> class="hljs-ln-line">}
class="hide-preCode-box"> class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
随后按 Esc
键进入命令模式,输入 :wq
然后回车即可退出 vim。
最后运行下面命令重启docker即可:
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="1"> class="hljs-ln-code"> class="hljs-ln-line">systemctl daemon-reload
- class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="2"> class="hljs-ln-code"> class="hljs-ln-line">systemctl restart docker
class="hljs-button signin active" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
详细Docker报错以及Docker配置安装Mysql请看下面博客:
Linux --- 如何安装Docker命令并且使用docker安装Mysql【一篇内容直接解决】-CSDN博客
>>
评论记录:
回复评论: