docker安装

Ubuntu安装

获取最新版本的 Docker 安装包

1
wget -qO- https://get.docker.com/ | sh

输入当前用户的密码后,就会下载脚本并且安装Docker及依赖包。

启动docker 后台服务

1
sudo service docker start

测试运行hello-world

1
docker run hello-world

Centos安装

  1. 确保 yum 包更新到最新

    1
    sudo yum update
  2. 安装

    1
    yum install docker
  3. docker启动

    1
    service docker start
  4. 测试

    1
    docker run hello-world
-------------本文结束 感谢您的阅读-------------