kali rolling安装docker

  • 检测系统版本:

  • 需要安装一些软件包,使apt能够通过https操作repository
$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg2 \
    software-properties-common

安装docker官方的gpg密钥

$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

导入docker的安装源

echo "deb https://download.docker.com/linux/debian stretch stable" >> /etc/apt/sources.list

导入以后更新一下源 apt-get update,再安装docker

apt install docker-ce

新版的docker安装的时候都叫docker-ce,docker-engine都是older-version,详见:https://docs.docker.com/install/linux/docker-ce/debian/

检测是否安装成功:

docker -v