版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/inforstack/article/details/79491913
环境:ubuntu16.04LTS
删除以前版本的Docker和Compose
sudo apt-get purge docker-compose
sudo apt-get purge docker-ce
安装依赖包
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
安装Docker
下载Docker安装包:
curl -O https://download.docker.com/linux/ubuntu/dists/xenial/pool/edge/amd64/docker-ce_17.05.0~ce-0~ubuntu-xenial_amd64.deb
安装Docker
sudo dpkg -i docker-ce_17.05.0~ce-0~ubuntu-xenial_amd64.deb
安装Compose
sudo curl -fSL http://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-ce-17.05-ubuntu-16.04-LTS-install
Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1. For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
如果报以上错误,那是因为你的操作系统没有附带libltdl7,可以使用以下命令安装它;
$ sudo apt-get install -y libltdl7
解决方案:点击打开链接