删除旧版 docker
apt remove -y docker docker-engine docker.io containerd runc
更新包
apt update
安装依赖
apt install ca-certificates curl gnupg lsb-release -y
添加Docker官方GPG密钥
国内:
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add -
# 出现错误,则执行
curl -s http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/NAME.gpg --import
添加Docker软件源
add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
安装docker
apt install docker-ce docker-ce-cli containerd.io -y
Can I ask a quick question about your site? https://google.com/?Wrism
RoWrism
Please