I was been hitting the same problem on docker-compose lately. The problem sounds like this.
ubuntu@ip-172-31-11-243:~/apache-hadoop-docker$ docker-compose -v
docker-compose version 1.8.0, build unknown
ubuntu@ip-172-31-11-243:~/apache-hadoop-docker$ docker-compose -f hdfs-cluster-nonkerberized.yml up
ERROR: Version in "./hdfs-cluster-nonkerberized.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/
ubuntu@ip-172-31-11-243:~/apache-hadoop-docker$
There is nothing wrong when your docker-compose yml file started with version: 3.0 or above. Don't blame on your yml file, even you are the fresh guy to start to code docker-compose yml file. The problem is residing on the docker-compose that comes along with Ubuntu 16.04(Xenial). Don't think twice, please go ahead and upgrade it. Your life will be much better after all.
The steps to do upgrade. Considering that you are on Ubuntu Xenial, here are the steps
> mv /usr/bin/docker-compose /usr/bin/docker-compose-old
>curl -L https://github.com/docker/compose/releases/download/1.20.0/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose
>chmod +x /usr/bin/docker-compose
Enjoy!
No comments:
Post a Comment