Kali linux 安装docker

1. 查看Kali linux版本

root@xiaotech:~# lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:    kali-rolling
Codename:   kali-rolling

2. 安装docker

2.1 删除原系统docker

apt-get purge docker.io

2.2 添加docker-ce的apt 源

apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.daocloud.io/docker/linux/ubuntu/gpg | sudo apt-key add -

修改/etc/lsb_release文件如下

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.daocloud.io/docker/linux/ubuntu $(lsb_release -cs) stable"

2.3 更新apt数据库

apt-get update
apt-cache policy docker-ce*
apt-get install docker-ce

3. 配置docker镜像加速

curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://d1c9c786.m.daocloud.io
systemctl restart docker

你可能感兴趣的:(Kali linux 安装docker)