歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 14.04安裝Docker

Ubuntu 14.04安裝Docker

日期:2017/2/28 14:28:47   编辑:Linux教程

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

Copyright © Linux教程網 All Rights Reserved