yiisoft / yii2-docker

Official Docker images suitable for Yii 2.0
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
381 stars 202 forks source link

Build failed - compose file invalid - unsupported option target #150

Closed yavro closed 2 years ago

yavro commented 2 years ago

Hello, I am stuck at building this image. After cp .env-dist .env I ran docker-compose build but got an error:

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.php-min.build contains unsupported option: 'target'
services.php-dev.build contains unsupported option: 'target'

After some searching I have found that there is an issue with target option in compose files version https://github.com/docker/compose/issues/5714 But in my case changing version in the compose files only produces another error:

ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.php-dev: 'extends'

Docker compose info:

docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.8.10
OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020
schmunk42 commented 2 years ago

I think you need to upgrade docker-compose itself

yavro commented 2 years ago

Oh, I did not realize that I had docker-compose installed from ubuntu repo. I removed the old version and manually installed the latest version from github and now everything works. Sorry for opening unnecessary issue.