使用官方安装脚本自动安装

国内daocloud一键安装命令
curl -sSL https://get.daocloud.io/docker | sh

安装测试

启动Docker
systemctl start docker
Docker自启
systemctl enable docker
运行hello-world
docker pull hello-world
docker run hello-world

添加docker用户

  1. sudo groupadd docker
  2. sudo gpasswd -a $USER docker
  3. newgrp docker
  4. docker ps