curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -
DaoCloud 安装脚本:
1
curl -sSL https://get.daocloud.io/docker | sh
两个脚本可以任选其一,速度都非常不错。
等待脚本执行完毕之后,就可以使用 Docker 相关命令了,如运行测试 Hello World 镜像:
1
docker run hello-world
运行结果:
1 2 3 4 5 6 7
Unable tofind image 'hello-world:latest' locally latest: Pulling from library/hello-world 78445dd45222: Pull complete Digest:sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears tobe working correctly.
如果出现上文类似提示内容则证明 Docker 可以正常使用了。
Mac 下的安装
Mac 平台同样有两种选择,Docker for Mac 和 Docker Toolbox。
Docker for Mac 要求系统为 OS X EI Captain 10.11 或更新,至少 4GB 内存,如果你的系统满足此要求,则强烈建议安装 Docker for Mac。