3 ms·
Docker Bake is now generally available
- pm90 2y agoNeat! I hope this is part of the OSS interface so eg podman can implement something similar. I can’t remember the last time I ran docker locally. All my docker builds now happen on remote clusters.
- meow_cat 2y agoI'm not sure I understand the use case. What problems does this solve that a nice Docker Compose file doesn't?
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- esseph 2y agoCompose is orchestrating the containers Bake builds the containers from source
- thangngoc89 2y agoFYI: Bake is a feature of Docker Buildx that lets you define your build configuration using a declarative file, as opposed to specifying a complex CLI expression. It also lets you run multiple builds concurrently with a single invocation. A Bake file can be written in HCL, JSON, or YAML formats, where the YAML format is an extension of a Docker Compose file From: https://docs.docker.com/build/bake/ https://docs.docker.com/build/bake/
- arcmechanica 2y agoAbout time. https://github.com/containers/ramalama https://github.com/containers/ramalama also working on this
- miiiiiike 2y agoIs there a way to specify an image’s build dependencies without manually grouping targets for parallelization? For example, if image D depends on both B and C to be built first and images B and C depended on A. The build order would be: 0) A builds by itself. 1) B and C builds in parallel. 2) D builds by itself. I built a tool to do this years ago and I’d really like to retire it. Compose ignores “depends_on” for builds: https://github.com/docker/compose/issues/6332#issuecomment-437143989 https://github.com/docker/compose/issues/6332#issuecomment-4...
- moltar 2y agoHave you figured it out?
- miiiiiike 2y agoI've been playing with it for the past hour this morning. It looks like it does everything I want it to do and more.
- miiiiiike 2y agoIt all "just works". No "depends_on", you just specify your "FROM" as usual and it just figures it all out for you.
- moltar 2y agoHm, that’s interesting. Are you saying just specifying the FROM in the Dockerfile is enough? I’ve seen a trick floating around specifying from in the bake config in addition to Dockerfile.
- miiiiiike 2y agoKind of, you use contexts. You can create contexts that point to other targets. So in your Dockerfile you can use `FROM project-base` where `project-base` is whatever you specified in the context. See "Pinning an Alpine image" here: https://docs.docker.com/build/bake/contexts/#pinning-alpine-image https://docs.docker.com/build/bake/contexts/#pinning-alpine-...
- kevmo314 2y agoThe targets documentation makes this seem like Bazel but everything is a container, so you don't have to learn the ins and outs of a build system versus using whatever tooling is most familiar + a thin Docker config layer. https://docs.docker.com/build/bake/targets/ https://docs.docker.com/build/bake/targets/ Neat idea, I like it. Interested to see if it gets adopted more widely.
- akshayshah 2y agoEarthly is a very similar idea too.
- lopkeny12ko 2y agoA quote from that page claims that Bake saves complexity by removing "all the flags and environment variables" from a build command, but as far as I can tell, all those flags and environment variables are still there, they're just now defined even more verbosely in an HCL file...
- ei625 2y agoMake Docker chat so that we don't need to learn it again.
- thunderbong 2y agoWhy is this flagged?
- thunky 2y agoGood question. HN flagging either needs more transparency or an overhaul.
- Tadpole9181 2y agoFlagged an actual major technology release and it hasn't been fixed in a week. What a joke of a "tech forum".
- kylegalbraith 2y agoIt's cool to see bake go GA. We've been supporting bake at Depot [0] for a while now and it is a unsung hero when it comes to building multiple images in parallel. We help many folks adopt it for their monorepo setups in particular. With Depot, folks can get the highly parallelized builds right out of the box, but bake takes it to another level by allowing you to define all your image builds in one place like an HCL, Compose, or JSON file. We've added some extra spice to fan out builds across multiple BuildKit instances [1]. If you're interested in bake and want a go-to guide, we wrote this blog post a while back: https://depot.dev/blog/buildx-bake-deep-dive https://depot.dev/blog/buildx-bake-deep-dive. [0] https://depot.dev https://depot.dev [1] https://depot.dev/changelog/2024-06-07-depot-cli-bake-multiple-projects https://depot.dev/changelog/2024-06-07-depot-cli-bake-multip...
- miiiiiike 2y agoWhy was this post flagged?