sudo apt remove docker docker-engine docker-ce docker.io
sudo apt update && apt install -y apt-transport-https ca-certificates curl software-properties-common
推荐使用阿里云源
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
添加的Docker需与Docker密钥相对应,若第三步使用了阿里云的密钥,此处就使用阿里云的Docker源
sudo add-apt-repository "deb [arch=arm64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
$(lsb_release -cs)
是获取当前 Ubuntu 代号
sudo add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update && apt install -y docker-ce
详见X86安装Docker
systemstl status docker