Bake to OCI with multiple images
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
With a compose file
services:
service1:
build: services/service1
image: service1:0.0.1
service2:
build: services/service2
image: service2:0.0.1
I want to bake this into a single OCI tar file, containing both images with
docker buildx bake -f docker-compose.yml --set="*.output=type=oci,dest=out.tar"
This builds fine, but the resulting OCI tar file never contains both images, always just one. (The resulting manifest.json list only has one entry.
Is this unsupported, or am is there something wrong?
With --load, both containers get loaded fine to the local docker, and I can then save those again with docker save service1:0.0.1 service2:0.0.1 > out.tar. This produces a correct image with two entries. However, it would be nice if we could directly build to the OCI image.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the provided docker buildx bake command with the two-service compose file and inspect how OCI output handles multiple bake targets. Done means the resulting out.tar contains both images, with two entries in its manifest.json, rather than only one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, go
- Domain
- build-system, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100