apt-get install apt-transport-https dirmngr
添加 Docker 的库到 Debian 9 的 /etc/apt/sources.list
echo 'deb https://apt.dockerproject.org/repo debian-stretch main' >> /etc/apt/sources.list
可以用 cat 命令看一下 sources.list 中已经添加成功
cat /etc/apt/sources.list
获取 Docker 库的签名和索引更新:
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D apt-get update
安装 Docker:
apt-get install docker-engine