Ability to retrieve image IDs when using multiple exporters
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
Description
If I invoke docker buildx build --output type=docker --output type=oci,dest=oci.tar contextPath I should be able to add --iidfile or --metadata-file and have the generated files contain the image IDs of both images.
If you try this today, the generated files will contain one of the IDs but not the other.
I am expecting the generated files to contain both IDs and an indication of which exporter each one corresponds to.
Today, if I invoke the above command on this Dockerfile:
FROM scratch
COPY empty.txt .
I get this output:
[internal] load build definition from Dockerfile
transferring 76/0 0.007
[internal] load .dockerignore
[internal] load build context
transferring 2512/0 0.004
[1/1] COPY logback-test.xml .
exporting to oci image format
exporting layers 0/0 0.058
exporting manifest sha256:56b029f44ccd04d2f15a2b9ad39957f469c29fc880053750c2913ee09aab64bd 0/0 0.735
exporting config sha256:fcbc65ed4feab765a528cdaa54b355b433dc6e4d86f29cc6dfc0a4ca20315110 0/0 0.004
sending tarball 0/0 0.006
exporting to image
exporting attestation manifest sha256:28f376eaa0ec7b68391b720540d177f6a1caacb59b020bdc8bec92c91845688f 0/0 0.018
exporting manifest list sha256:3f4a3acab60068864e10ec341ef83a418edfd355185bd70d792be8c719eccc51 0/0 0.01
naming to moby-dangling@sha256:3f4a3acab60068864e10ec341ef83a418edfd355185bd70d792be8c719eccc51 0/0 0.003
unpacking to moby-dangling@sha256:3f4a3acab60068864e10ec341ef83a418edfd355185bd70d792be8c719eccc51 0/0 0.018
The OCI and Docker images have different IDs. I'd like to be able to look then up without parsing the console output.
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
Start at the docker buildx build handling for --iidfile and --metadata-file, using the multiple-exporter command in the issue as the repro. Trace how each exporter produces its image ID and define metadata that records both IDs with their exporter identities; done when the generated files expose both IDs without parsing console output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100