You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, a docker compose file can service as a bake file. This is great when you already use a docker compose file for your build spec, but docker bake allows for much more robust and complex build configurations than what compose supports.
Now that Bake is GA, it would be great if we could instead specify a bake file and target as the build spec for a compose service. This would allow for much richer build definitions that are shared across development and production, while still allowing existing docker compose workflows to run as is.
Put another way, it would be wonderful if docker compose up --build could invoke a Bake build rather than only being able to reference a standard Dockerfile.
The text was updated successfully, but these errors were encountered:
What do you have in mind as "more robust and complex build configurations" when it comes to a single image being built ?
AFAICT docker compose build definition gives you all the features bake supports, and actually latest Docker Compose release can rely on bake under the hood to run the build, which make multi-services sharing common resources build more efficient.
What do you have in mind as "more robust and complex build configurations" when it comes to a single image being built ?
Yes. Perhaps the most powerful feature of bake is being able to coordinate builds across dependencies. For example, with Bake, it's trivial to have a base image that is used in your final images and have it built automatically as needed. It's also trivial to use inheritance and targets to share a Dockerfile between a production build and debug-enabled dev build. Finally, Docker Bake supports functions.
AFAIK, none of what I've listed is supported by the docker compose build configuration without an extra layer of coordination.
Description
Today, a docker compose file can service as a bake file. This is great when you already use a docker compose file for your build spec, but docker bake allows for much more robust and complex build configurations than what compose supports.
Now that Bake is GA, it would be great if we could instead specify a bake file and target as the build spec for a compose service. This would allow for much richer build definitions that are shared across development and production, while still allowing existing docker compose workflows to run as is.
Put another way, it would be wonderful if
docker compose up --build
could invoke a Bake build rather than only being able to reference a standard Dockerfile.The text was updated successfully, but these errors were encountered: