手机版
你好,游客 登录 注册
背景:
阅读新闻

Ubuntu 14.04安装Docker

[日期:2014-08-17] 来源:Linux社区  作者:smallfish1983 [字体: ]

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

然后重复上面的步骤即可

CentOS 6/7系列安装Docker http://www.linuxidc.com/Linux/2014-07/104768.htm

Docker的搭建Gitlab CI 全过程详解 http://www.linuxidc.com/Linux/2013-12/93537.htm

Docker安装应用(CentOS 6.5_x64) http://www.linuxidc.com/Linux/2014-07/104595.htm

Docker 和一个正常的虚拟机有何区别? http://www.linuxidc.com/Linux/2013-12/93740.htm

在 Docker 中使用 MySQL http://www.linuxidc.com/Linux/2014-01/95354.htm

Docker 将改变所有事情 http://www.linuxidc.com/Linux/2013-12/93998.htm

Docker安装应用(CentOS 6.5_x64) http://www.linuxidc.com/Linux/2014-07/104595.htm

Docker 的详细介绍请点这里
Docker 的下载地址请点这里

更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2

本文永久更新链接地址http://www.linuxidc.com/Linux/2014-08/105656.htm

linux
本文评论   查看全部评论 (1)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款
第 1 楼
* 匿名 发表于 2016/12/19 12:21:04
service docker.io restart

或者直接restart docker.io