There are a lot of posts on the Docker installation, using blogs. This is just a record of your own use.
I installed on Ubuntu 14.04,
Requirements to install Docker:
- 64-bit system
- Kernel is more than 3.10 versions
My system:
$ uname-a
Linux ubuntu 3.19.0-25-generic #26 ~14.04.1-ubuntu SMP Fri Jul 21:16:20 UTC x86_64 x86_64 x86_64 gnu/linux
No problem.
I installed the latest version of:
$ apt-get Install Apt-transport-https #需要http支持, * on-line requirements, I didn't use to
$ sudo apt-key adv--keyserver hkp://keyserver.ubuntu.com:80--recv-keys 36a1d7869245c8950f966e92d8576a8ba88d21e9 #* Online requirements, I didn't use it.
$ 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
The installation is complete.
Check it out,
$ Docker--version #-V also available
Docker version 1.9.1, build A34a1d5
The instructions were successful.
Problem found:
$ Docker Images #查看镜像
Cannot connect to the Docker daemon. Is the Docker daemon running on this host?
It looks like Docker's not up. View the
$ PS-EF | grep Docker
Root 7346 1 0 08:43? 00:00:00/usr/bin/docker Daemon
Zxq 7504 4253 0 08:47 pts/4 00:00:00 grep--color=auto Docker
Got up. Actually, it's up, but you need root privileges.
Confirmation,
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
It sure does require root privileges.
To avoid the hassle of switching (I generally do not operate under root), you can add users to the Docker user group
$ sudo gpasswd-a zxq Docker #我的用户名: Zxq
After adding, log out is required, and then login in.
$ docker Images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
Ok.
The installation is over.
(1) Docker installation