1、首先查看linux系统版本
head -n 1 /etc/issue
2、升级包管理器
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
3、添加Docker仓库的key
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
4、创建docker.list
sudo vi /etc/apt/sources.list.d/docker.list
内容填写成:deb [https://apt.dockerproject.org/repo](https://apt.dockerproject.org/repo) ubuntu-wily main 执行立即生效:source /etc/profile 5、安装docker
sudo apt-get install docker.io
6、安装镜像
sudo apt-get install linux-image-generic-lts-trusty
sudo apt-get install linux-headers-generic-lts-trusty
sudo apt-get install xserver-xorg-lts-trusty
sudo apt-get install libgl1-mesa-glx-lts-trusty
sudo docker images
8、检查运行中的镜像
sudo docker inspect ubuntu
9、检查是否安装成功
sudo docker run ubuntu echo "hello word"