docker安装

系统:ubuntu 16.10

步骤:

uname -a

lsb_release -a

sudo apt-get update

sudo apt-get install docker.io

sudo service docker start/stop/status

sudo docker version

sudo docker images

sudo docker ps

ps aux | grep docker

ubuntu 16.10默认安装docker版本1.12.6

如果出现以下报错:

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

一般是由于:

1、docker服务没有启动

2、当前用户没有权限,需要加sudo

系统:centos 7.3

步骤:

uname -a

cat /etc/redhat-release

yum install -y docker

systemctl start/stop/status docker

docker version

docker images

docker ps

ps  aux | grep docker

centos 7.3默认安装docker版本1.12.6

原文地址:https://www.cnblogs.com/liuyongsheng/p/6724731.html