本文共 1267 字,大约阅读时间需要 4 分钟。
环境:ubuntu16.04LTS
sudo apt-get purge docker-composesudo apt-get purge docker-ce
sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common
下载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
sudo curl -fSL http://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64 -o /usr/local/bin/docker-composesudo chmod +x /usr/local/bin/docker-compose
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
解决方案: