当前位置:   article > 正文

Docker在Mac安装教程_mac安装docker

mac安装docker

1、在Docker官网下载安装包:Docker: Accelerated, Containerized Application DevelopmentDocker is a platform designed to help developers build, share, and run modern applications. We handle the tedious setup, so you can focus on the code.https://www.docker.com/2、安装后查看是否安装成功:

  1. docker --version
  2. docker version

出现:表示安装成功。

 3、运行

docker run hello-world

可能会出现以下错误:

  1. Unable to find image 'hello-world:latest' locally
  2. docker: Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate is valid for www.doctorcom.com, not registry-1.docker.io.
  3. See 'docker run --help'.

4、解决办法:

        在docker设置中找到Docker Enginer:在Json中加入:

"registry-mirrors": ["https://fop0tofh.mirror.aliyuncs.com"]

5、重启docker

6、如果还不行:则在/etc/host下加入IP地址

查看

dig @114.114.114.114 registry-1.docker.io

命令如下:sudo vim  /etc/hosts。

格式如下:

  1. 34.205.13.154 registry-1.docker.io
  2. 44.205.64.79 registry-1.docker.io
  3. 3.216.34.172 registry-1.docker.io

7、同时打开 sudo vim /etc/resolv.conf

  1. nameserver 8.8.8.8
  2. nameserver 8.8.4.4

8、然后重启项目。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/48771
推荐阅读
相关标签
  

闽ICP备14008679号