环境:ubuntu14.0.4 LTS server 64
1.将源加入ubuntu的源中
$vi /etc/apt/sources.list
在最后添加
deb https://get.docker.com/ubuntu docker main
2.需要安装 apt-transport-https 支持,之后通过添加源来安装。
#安装apt-transport-https
$ sudo apt-get install apt-transport-https
# 导入key
$apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
3.安装docker
$apt-get update
$apt-get install -y lxc-docker
Get:3 https://get.docker.io/ubuntu/ docker/main lxc-docker-1.4.1 amd64 1.4.1 [4,420 kB] Get:4 https://get.docker.io/ubuntu/ docker/main lxc-docker amd64 1.4.1 [2,090 B] Fetched 4,525 kB in 4min 22s (17.2 kB/s) Selecting previously unselected package aufs-tools. (Reading database ... 56766 files and directories currently installed.) Preparing to unpack .../aufs-tools_1%3a3.0+20111101-1ubuntu1_amd64.deb ... Unpacking aufs-tools (1:3.0+20111101-1ubuntu1) ... Selecting previously unselected package cgroup-lite. Preparing to unpack .../cgroup-lite_1.1.5_all.deb ... Unpacking cgroup-lite (1.1.5) ... Selecting previously unselected package lxc-docker-1.4.1. Preparing to unpack .../lxc-docker-1.4.1_1.4.1_amd64.deb ... Unpacking lxc-docker-1.4.1 (1.4.1) ... Selecting previously unselected package lxc-docker. Preparing to unpack .../lxc-docker_1.4.1_amd64.deb ... Unpacking lxc-docker (1.4.1) ... Processing triggers for man-db (2.6.7.1-1) ... Processing triggers for ureadahead (0.100.0-16) ... ureadahead will be reprofiled on next reboot Setting up aufs-tools (1:3.0+20111101-1ubuntu1) ... Setting up cgroup-lite (1.1.5) ... cgroup-lite start/running Setting up lxc-docker-1.4.1 (1.4.1) ... docker start/running, process 1985 Processing triggers for ureadahead (0.100.0-16) ... Setting up lxc-docker (1.4.1) ... Processing triggers for libc-bin (2.19-0ubuntu6) ... |
5.查看状态
root@pbdata:/home/ljy# ps -ef | grep docker root 1985 1 0 21:04 ? 00:00:00 /usr/bin/docker -d root 2063 1239 0 21:14 pts/0 00:00:00 grep --color=auto docker |