Ubuntu18.4 安装Docker ce

环境:虚拟机Ubuntu18.04+内核版本linux-4.19.23
安装Docker步骤如下:
(1)更新程序
sudo apt update

(2)安装依赖
sudo apt install apt-transport-https ca-certificates curl software-properties-common

(3)添加Dokcer官方密钥到系统中
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

(4)添加Docker源
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

(5)更新一下源
sudo apt update

(6)查看可以安装的docker版本
apt-cache policy docker-ce

(7)开始安装docker
sudo apt install docker-ce

(8)测试
docker --version

sudo docker run hello-world
以上安装Docker成功

你可能感兴趣的:(Ubuntu18.4 安装Docker ce)