安装基础工具
sudo apt-get install ca-certificates curl gnupg lsb-release
安装官方的GPG key
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
将Docker的库添加到apt资源列表中
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
更新apt
sudo apt update
安装 Docker 官方版
sudo apt install docker-ce
标签:gpg,sudo,apt,etc,22.04,Ubuntu,Docker,docker From: https://www.cnblogs.com/liuzonglin/p/17724142.html