3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Version in "./docker-compose.yaml" is unsupported.と言われた

Posted at

docker-composeのバージョンが古かったため、docker-compose upがエラーになってしまいました。
その際の対応をまとめていきます。

起こったエラー

ERROR: 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 supported version ("2.0", "2.1", "3.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/

やったこと

$ rm $(which docker-compose)
$ curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose

まとめ

本来であれば、macの場合Docker for Macをインストールしたらdocker-composeが使えるのですが、他のバージョンを入れてしまったために起こったようです。

参照

https://stackoverflow.com/questions/30988566/how-do-i-uninstall-docker-compose
http://docs.docker.jp/compose/install.html

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?