安装 Docker
1、安装前配置
添加Docker PGP key:
因为国内对docker官网的网速支持并不友好,我将使用清华镜像作为代替,阿里云docker对一些镜像支持也太友好故未选择。
curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian/gpg | sudo apt-key add -
配置Docker APT repository:
(Kali is based on Debian testing, which will be called buster upon release, and Docker now has support for it)
echo 'deb https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian/ buster stable' | sudo tee /etc/apt/sources.list.d/docker.list
更新APT
2、安装Docker
如果您安装了旧版本的Docker,请卸载它们:
sudo apt-get remove docker docker-engine docker.io
安装docker:
sudo apt-get install docker-ce
查看docker状态:
sudo systemctl status docker
启动docker:
sudo systemctl start docker
开机自动启动:
sudo systemctl enable docker
最后更新于
这有帮助吗?