Compose: Multi-stage build target support in Compose file version 3.x

Created on 27 Oct 2017  路  10Comments  路  Source: docker/compose

Support for the target option is missing in 3.x version of Compose file format. It is supported in 2.3 though #5043. Looking at the compatibility matrix, it should be added in 3.3+ versions as well because they support Docker version 17.06.0+.

Most helpful comment

All 10 comments

It supports in 3.4 version, started from 1.17

Thanks @VolCh. Since 1.17 is still in RC phase, I will wait until it reaches to masses, meanwhile I will continue using 2.3.

But documentation https://docs.docker.com/compose/compose-file/#build does not say anything about this option :smile:

any update on this?

@jeeyoungk The feature has been implemented and available in main releases for several months.

@shin- could you point me to the docs? It seems to be undocumented. https://docs.docker.com/compose/reference/build/
https://docs.docker.com/compose/compose-file/#build

https://docs.docker.com/compose/compose-file/compose-file-v2/#target

That is the documentation of version 2 of compose file, not version 3.

Yeah. The option works the same, but obviously it's missing from the v3 docs. Feel free to create an issue for this on the docs repo: https://github.com/docker/docker.github.io

Was this page helpful?
0 / 5 - 0 ratings