一、ubuntu安装docker
-
切换root
su -
更新ubuntu的apt源
apt-get update -
允许apt通过HTTPS使用仓库
apt-get install apt-transport-https ca-certificates curl software-properties-common -
添加Docker官方GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - -
设置Docker稳定版仓库
add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable” -
更新apt源
apt-get update -
安装最新版Docker CE(社区版)
apt-get install docker-ce --fix-missing -
检查docker安装结果
docker run hello-world
表示安装成功