1、执行命令安装docker
1、Update the apt package index:
sudo apt-get update
2、Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common3、Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4、Use the following command to set up the stable repository. You always need the stable repository, even if you want to install builds from the edge or test repositories as well. To add the edge or test repository, add the word edge or test (or both) after the word stable in the commands below.
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"5、sudo apt-get update
6、sudo apt-get install docker-ce
2、执行启动docker
sudo service docker start | stop | restart
3、uninstall docker
sudo apt-get purge docker-ce