Ubuntu系统安装Docker
更新软件包索引
sudo apt-get update
允许APT使用HTTPS
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
添加Docker官方GPG密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
添加Docker的稳定版本仓库
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
再次更新软件包索引
sudo apt-get update
安装Docker CE(社区版)
sudo apt-get install docker-ce
验证Docker是否安装成功
sudo systemctl status docker
或者运行:
docker ps