赞
踩
-
- root@xiaotech:~# lsb_release -a
- No LSB modules are available.
- Distributor ID: Kali
- Description: Kali GNU/Linux Rolling
- Release: kali-rolling
- Codename: kali-rolling
-
- apt-get purge docker.io
-
- 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"
- apt-get update
- apt-cache policy docker-ce*
- apt-get install docker-ce
-
- curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://d1c9c786.m.daocloud.io
- systemctl restart docke
在安装完成后,发现docker-compose出现错误,可以通过一下方式解决:
安装 Docker Compose
- # 你可以通过修改URL中的版本,可以自定义您的需要的版本
- curl -L https://get.daocloud.io/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
-
- # 为安装脚本添加执行权限
- chmod +x /usr/local/bin/docker-compose
-
- # 安装Compose命令补全工具
- curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
在重新登录后,输入docker-compose 并按下Tab键,Compose就可自动补全命令了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。