-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build target doesn't work in compose 1.19 #5714
Comments
The issue was I've used version |
Just wanted to say thanks for this, for some reason I assumed if you put '3' as the version type, it would default to the latest supported version of '3' your docker client supports, but I was wrong. Doing the steps above, in my case, |
Also pretty confusing for me, since this is documented in version 2 as well. I assumed that if it was available in 2.3 then naturally it'd also automatically be available in 3. Turns out that's not the case, for some reason. |
Same error at 3.7.4 D:\WORK\Projects\api>docker-compose version
docker-compose version 1.25.5, build 8a1c60f6
docker-py version: 4.1.0
CPython version: 3.7.4
OpenSSL version: OpenSSL 1.1.1c 28 May 2019
D:\WORK\Projects\api>docker-compose up
ERROR: The Compose file '.\docker-compose.yml' is invalid because:
services.api.build contains unsupported option: 'target'
services.synchronizer.build contains unsupported option: 'target'
|
@akopchinskiy in this case the version is in reference to the version of the YAML content not necessarily the version of Specifically: Did you try editing |
I did try and it's working. Thank you! |
I have the following in
docker-compose.yml
:I'm using
docker-compose version 1.19.0, build 9e633ef
installed viapip3
.After running
docker-compose build
the expected result is to have the container forapp
service build with--target
docker argument set toapp
.The actual result is
Related issues
I've found this issue #5322 which states in comments that the build target is supported since 1.17.
Also, I've found this issue docker/docs#6036 which states that the syntax is the same as for
2.x
compose file version.The text was updated successfully, but these errors were encountered: