linux docker安装脚本

复制一下脚本执行,即可直接安装好docker

echo '开始安装docker' &&
sudo apt-get remove docker docker-engine docker.io containerd runc &&
sudo apt-get update &&
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y &&
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - &&
sudo add-apt-repository  "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" &&
sudo apt-get update &&
sudo apt-get install docker-ce docker-ce-cli containerd.io -y &&
sudo apt-get install docker-ce=5:19.03.13~3-0~ubuntu-bionic docker-ce-cli=5:19.03.13~3-0~ubuntu-bionic containerd.io &&
sudo docker pull hello-world &&
sudo docker run hello-world &&
echo 'docker安装完毕'
posted @ 2020-12-01 15:52  HumorChen99  阅读(0)  评论(0编辑  收藏  举报  来源