安装curl:
更新软件包:
sudo apt update
安装curl:
sudo apt install curl
安装Docker:
更新软件包和依赖项:
sudo apt-get update
sudo apt-get upgrade
安装Docker、Docker GPG密钥、Docker存储库:
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io
验证Docker安装:
sudo docker run hello-world
安装Docker-compose:
sudo apt install docker-compose -y
检查更新
sudo apt upgrade #需要确认
sudo apt upgrade -y #不需要确认