Docker currently only runs on 64-bits platforms and requires that the kernal version be no less than 3.10.
in this tutorial , i use ubuntu 16.04 and the kernal version is 4.13.0-43-generic
you can use this command to find your linux-version and linux-kernal version.
uname -a
cat /proc/version
At the first , you need to update your existing list of packages:
sudo apt update
Second, you need to install a few prerequisite packages which let apt use packages over HTTPS
sudo apt install apt-transport-https ca-certificates curl software-properties-common
add the GPG key for the official Docker repository to your system:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Add the Docker repository to APT sources:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
update the package database with the Docker packages from the newly added repo:
sudo apt-get update
After you can install Docker
sudo apt-get install docker-ce
if you have error on apt-get like this :
you can use this command to find the process using apt , and kill it !
ps aux | grep apt
after that , how can you check that docker is installed ?
you can use this command to chek
sudo service docker start
docker version
原文地址:http://blog.51cto.com/12098022/2294095