1.sudo apt-get remove docker docker-engine docker.io containerd runc
2.sudo apt-get update
3.sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
4.curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
如果遇到问题:gpg: no valid OpenPGP data found
解决方法:
curl -O https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc
sudo apt-key add ros.asc
5.sudo apt-key fingerprint 0EBFCD88
6.sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable”
7.sudo apt-get install docker-ce docker-ce-cli containerd.io
8.sudo docker run hello-world
9.docker ps -a
10.service docker status