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
And then execute with docker buildx bake -f ./docker-bake.hcl I only get prj1 image exported. prj2 still builds just doesn't get exported.
Also can / could a bake file be used to effectively stitch multiple dockerfiles together?
Our monorepo has 20+ projects, all with their own Dockerfile "segments" - I say this because if you tried to build one of these files by it's self it would probably fail as it depends on parent build stages defined in other files.
I have written a script that concatenates all the Dockerfiles together into a single Dockerfile in the correct order so that build stages refer to each other correctly and then I execute a buildkit build on this giant Dockerfile. Using the approach outlined at moby/buildkit#609
It would be great if I could define normal standalone Dockerfiles and then use a bake file to do the stitching / build in correct order, consider the following contrived example:
And the punch line that truly sums up what I am after:
DockerMake.yml lets you split your image build up into discrete, easy to manage steps that can be mixed together (as a dependency graph) to produce your desired container image.
Build stages allow us to do that in a single file. In my opinion there needs to be a way to achieve this across multiple Dockerfiles.
We had to split a given target into 2 targets with distinct subsets of architectures in jenkinsci/docker-agent#310 and now only 1 of these targets is pushed, while all are builts.
It seems the "push" behavior of buildx is not generating the expected manifest.
Wanted to re look at this moby/buildkit#609 now that we have
docker buildx bake
.I am trying to determine if
bake
has ultimately been built to solve this issue or are it's goals slightly different?If I use a bake file like this:
And then execute with
docker buildx bake -f ./docker-bake.hcl
I only getprj1
image exported.prj2
still builds just doesn't get exported.Also can / could a bake file be used to effectively stitch multiple dockerfiles together?
Our monorepo has 20+ projects, all with their own Dockerfile "segments" - I say this because if you tried to build one of these files by it's self it would probably fail as it depends on parent build stages defined in other files.
I have written a script that concatenates all the Dockerfiles together into a single Dockerfile in the correct order so that build stages refer to each other correctly and then I execute a buildkit build on this giant Dockerfile. Using the approach outlined at moby/buildkit#609
It would be great if I could define normal standalone Dockerfiles and then use a bake file to do the stitching / build in correct order, consider the following contrived example:
node-modules.dockerfile
prj1.dockerfile
prj2.dockerfile
docker-bake.hcl
Perhaps bake can already do this but I haven't figured it out yet?
The text was updated successfully, but these errors were encountered: