I noticed docker compose is now telling me I can set COMPOSE_BAKE=true for “better performance”.
Does anyone have any experience with this? Is it worth it? I get suspicious when a program tells me “just use this, it has better performance”, but it’s not the default.
I haven’t used it myself, and I’ve only just learned about it through this post.
Reading through the docs, though, it seems more beneficial if you are on a team of people. Seems like it basically combines Compose and a custom run/build script into one idea.
Personally, for my solo projects, I will likely continue using just compose for multi-service projects and basic
docker run
for stupid stuff. Unless I’m missing something, it doesn’t seem like there is too much of a benefit with Bake if you’re solo. It just adds more config files and json to your project IMO.They even state as much in the introduction:
Reading the docs a little can go a long way in understanding.My bad, didn’t seem like you had read up on it.ETA: Thinking on it more, it seems less useful to implement unless your project is 100% inside Docker. If you need to do other things besides build a Docker image or two from a compose file, it is much easier to accomplish what you need through a bash script that can interact with more than just Docker. Even if I did implement this, I’m going to end up wrapping the bake commands with a bash script any way.
I did read the docs. My question is more about the actual user experience, like has any team used this? Building images is not a bottleneck of mine and most of my projects are small, so I was curious with the discrepancy between:
When I see something like that, I get curious. If you haven’t tried it, that’s fair. Just looking to hear from a user, happy or not.
From the way you worded the post, it didn’t seem like you had looked into it very much. If you want to compare to similar experiences, this looks to me like Docker’s version of a lockfile.
They don’t even use the actual word “performance” on any of the doc pages for Bake, so the build output thing is very poorly worded, and it sucks that they feel the need to put it in build output.
I agree. I treat that as holy ground. If it doesn’t have really large implications, I do NOT want to see it in the output. Reminds me of installing things in npm and seeing all the little ‘shoutouts’.