docker安装

Docker利用Linux容器(LXC)虚拟化技术提供一份部署环境。Docker目的是创建可移植,可分发给任何的Docker环境中运行。Docker由于是OpenVZ的作品,对内核有一些要求,不要在14.04版本的Ubuntu仓库中已经可以查找到。

安装Docker使用apt-get命令:

$ apt-get install docker.io

启动服务和守护进程

$ service docker.io status

$ service docker.io start

创建软连接

ln -sf /usr/bin/docker.io /usr/local/bin/docker

如没有提示错误则说明你已经在Ubuntu14.04上面快速安装Docker成功了。

------------------------另一篇------------------------

Ubuntu Trusty comes with a 3.13.0 Linux kernel, and a docker.io package which installs Docker 0.9.1 and all its prerequisites from Ubuntu's repository.Note: Ubuntu (and Debian) contain a much older KDE3/GNOME2 package called docker, so the package and the executable are called docker.io.

$ sudo apt-get update
$ sudo apt-get install docker.io
$ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker
$ sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io

如果使用操作系统自带包安装docker  ,使用上面的办法,安装的版本是0.9.1 (不建议,因为1.0 生产版本已经发布,下面介绍安装方法)

f you'd like to try the latest version of Docker:

First, check that your APT system can deal with https URLs: the file /usr/lib/apt/methods/httpsshould exist. If it doesn't, you need to install the package apt-transport-https.

如果要安装最新的docker版本,那么需要安装https支持

apt-get install apt-transport-https 
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9

$ sudo sh -c "echo deb https://get.docker.io/ubuntu docker main\

> /etc/apt/sources.list.d/docker.list"

$ sudo apt-get update

$ sudo apt-get install lxc-docker

这样就安装完毕了。

ubuntu12.04安装docker

如果是更低版本的ubuntu

$ sudo apt-get update

$ sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring

# reboot

$ sudo reboot

然后重复上面的步骤即可


转载地址:

http://www.linuxidc.com/Linux/2014-08/105656.htm


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值