kali2019.4安装Docker塘坑

       自测kali安装docker不能用阿里云的镜像方法,在写入软件信息时会报如下错,无法实现按照Ubuntu系统安装Docker的步骤继续进行。

写入软件源信息
root@master:~# add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

错误展示
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 95, in 
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Kali/kali-rolling


 如下是安装成功的解决方案

第一、查看系统的版本

root@master:~# cat /proc/version

Linux version 5.3.0-kali3-amd64 ([email protected]) (gcc version 9.2.1 20191130 (Debian 9.2.1-21)) #1 SMP Debian 5.3.15-1kali1 (2019-12-09)

 结果是Debian 9系列,这个版本的也叫stretch

第二、下载docker所对应的debain版本

地址:https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/

 

下载必须安装的三个包 

containerd.io_1.2.6-3_amd64.deb
docker-ce-cli_19.03.5~3-0~debian-stretch_amd64.deb
docker-ce_19.03.5~3-0~debian-stretch_amd64.deb

在下载此三个安装包的目录执行如下命令,进行安装

root@master:~# dpkg -i *.deb

第三、开启服务

root@master:~# systemctl enable docker && systemctl start docker

第四、验证

root@master:~# docker info
Client:
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 19.03.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
 init version: fec3683
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.3.0-kali3-amd64
 Operating System: Kali GNU/Linux Rolling
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.645GiB
 Name: master
 ID: YLYJ:YKPL:CX6G:4PKD:6ED4:YAFI:3EFQ:BXWP:DLW7:I4T4:F2IN:6QJV
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

 有此显示,安装成功

 

你可能感兴趣的:(kali2019.4安装Docker塘坑)