docker安装
1.卸载旧版本docker
$ sudo apt-get remove docker docker-engine docker.io
2.更新系统软件
sudo apt-get update
3.安装依赖包
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
4.添加官方密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
5.添加仓库
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
6.再次更新软件
sudo apt-get update
7.安装docker
如果想指定安装某一版本,可使用 sudo apt-get install docker-ce=<VERSION> 命令,把<VERSION>替换为具体版本即可。
sudo apt-get install docker-ce
8.查看docker版本
docker -v
docker-compose安装
1.安装
curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
2.查看版本
docker-compose version
Docker问答录
https://blog.lab99.org/post/docker-2016-07-14-faq.html#docker-zi-liao-hao-shao-a-wang-shang-de-ming-ling-zen-me-bu-neng-yong