MAC OS X上安装Docker

使用Doker Toolbox安装Docker。Doker Toolbox包含以下工具:
* 运行编译过的docker-machine的Docker Machine
* 运行docker的Docker Engine
* 运行docker-compose的Docker Compose
* Docker GUI, Kitematic
* 一个支持Docker命令行环境预编译好的shell
* Oracle VM VirtualBox

由于Docker使用Linux特有的内核功能,你无法在OS X中直接运行Docker。相应的,你必须使用docker-machine来创建Docker VM到你的机器上。

检查系统版本

你的mac必须要运行OS X 10.6(雪豹)以上以运行docker。

安装Docker Toolbox

  1. 访问Docker Toolbox
  2. 下载安装文件,这个可能需要FQ
  3. 直接运行安装文件即可,注意安装前如果打开virtualbox,请先退出
    默认的安装位置是/usr/local/bin

  4. 验证安装,为运行Docker容器,你需要:

    • 创建或者启动一个Docker虚拟机
    • 将环境切换到新的VM上
    • 使用docker客户端来创建、加载和管理窗口

    VM被创建后,你可以尽可能多的重复使用它们,像其它的VM一样,它自己在不同的应用中维护对应的配置。

  • 4.1 点击Docker Quickstart Terminal开始创建VM
  • 4.2 在命令行中输入docker run hello-world,如果环境没问题的话,这个命令的输出应该是这样:
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
af340544ed62: Pulling fs layer 
535020c3e8ad: Download complete
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.
 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 Hub account:
 https://hub.docker.com

至此,Docker安装完成。

posted on 2015-09-01 20:38 qianyiliushang 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/qianyiliushang/p/4776826.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值