11
8

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.

【Docker】docker-compose buildの際のエラー文The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services.volumes: の解決法

Posted at

docker-compose buildをしたところ次のエラー。

The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.volumes: 'mysql-data'

##考えられる要因は2つ。

###インデントがそろってない。
こちらはひたすら見て探す。
今回だとmysql-dataの部分にエラーがあるということで、インデントミスがないか探しましょう。

###Dockerのバージョンを更新する。

現在のバージョンを確認し、

$  docker-compose -v

$  docker-compose version 1.25.4, build 8d51620a

Docker公式サイトで最新のバージョンを確認し、バージョンを更新します。

$  curl -L "https://github.com/docker/compose/releases/download/バージョン/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
11
8
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
11
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?