debian安装docker

(1)安装依赖

apt-get update

apt-get install -y apt-transport-https ca-certificates

apt-get install dirmngr

(2)设置源

curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian/gpg | sudo apt-key add -

echo 'deb https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian/ buster stable' | sudo tee /etc/apt/sources.list.d/docker.list

(3)安装

apt install docker-ce

apt install docker-ce-cli

apt install docker.io

(4)启动

service docker start

(5)查看版本

docker version