代码语言:javascript复制
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
代码语言:javascript复制echo 'deb https://download.docker.com/linux/debian stretch stable'> /etc/apt/sources.list.d/docker.list
代码语言:javascript复制apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
代码语言:javascript复制apt-get update
代码语言:javascript复制sudo apt install docker.io
代码语言:javascript复制docker -v
检查docker安装情况,出现下图情况即安装成功。