1. Environmental preparation

1. Use Linux Deploy to install Debian phones

2. Use SSH to connect to debian remotely

2. Operation steps

1. Log in the user with sudo or root authority.

2. Clear the old warehouse:

$ sudo apt-get purge lxc-docker*

$ sudo apt-get purge docker.io*

3. Update the package information to ensure that APT works in HTTPS mode and CA certificates are installed:

$ sudo apt-get install apt-transport-https ca-certificates

4. Add a new GPG key
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609

5. Use a file editor to open /etc/apt/sources.list.d/docker.list, and create it if the file does not exist.

Delete all existing entries and add the following:

deb https://apt.dockerproject.org/repo debian-jessie main

6. Update APT software package index

$ sudo apt-get update

7. Install docker
$ sudo apt-get install docker-engine

3. Installation verification

We started the docker engine through service docker start, and felt that the start was abnormal, and there was no small flashing animation.

We check the docker status through service docker status

130404_NnbU_2846946.png

The startup failed. We checked the logs. The Docker engine logs were generally handed over to Upstart (Ubuntu 14.04) or systemd (CentOS 7, Ubuntu 16.04). The former is generally located under /var/log/upstart/docker.log, and the latter is generally read by jounarlctl -u docker. Different systems have different locations. Some people listed on the Internet can refer to:

30142a7fa6ba561882151f350a4be8ac0bf.jpg

We view the docker running log through the terminal:

125821_CBP3_2846946.png

The detailed log is as follows:

130201_bzo9_2846946.png

You can see from the above log:

level=fatal msg="Your Linux kernel version 3.4.0-gf4b741d-00692-gd785c3d is not supported for running docker. Please upgrade your kernel to 3.10.0 or newer."

The log indicates that the kernel of the system is too low. At least the kernel version needs to be 3.10.0 or later. Then we upgrade the kernel version of the system and start docker.

The use of docker tutorial refers to the following docker operation article