ubuntu 安装docker

在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"

安装 Docker 最新版本

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io

验证Docker 状态

sudo systemctl status docker

 

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注