# 首先删除
sudo apt remove docker docker-engine docker.io containerd runc
# 更新库
sudo apt-get udpate
# 下载docker
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
# 检查 lsb-release 命令是否存在,没有的话就 install : sudo apt-get install lsb_release
lsb_release -a
# 下载docker
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
# 启动docker
sudo docker run hello-world
# 安装docker compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose -version
# 检查是否有git 命令
git version
git clone https:
|