mirror of
https://github.com/games-on-whales/LXC2Docker.git
synced 2026-10-15 21:02:07 +00:00
[PR #128] [MERGED] fix(build): aux.ID is the real sha256 config digest, not the image ref #129
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/LXC2Docker#129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/LXC2Docker/pull/128
Author: @JBailes
Created: 7/1/2026
Status: ✅ Merged
Merged: 7/1/2026
Merged by: @JBailes
Base:
main← Head:fix/build-config-digest📝 Commits (1)
7d3e98bfix(build): aux.ID is the real sha256 config digest, not the image ref📊 Changes
1 file changed (+14 additions, -1 deletions)
View changed files
📝
internal/api/build.go(+14 -1)📄 Description
Part 2 of the real-image-ID work (follows #126, which did commit + the shared infra).
POST /build's final aux emitted{"aux":{"ID":"<repo>:<tag>"}}— real Docker emits the image ID:{"aux":{"ID":"sha256:<config-digest>"}}.Fix
After the build succeeds, compute the digest over the built rootfs via
computeConfigDigest(rec)— the built record is already in the store, soopenImageRootfsresolves the real built rootfs (accurate, and matches a laterdocker saveof the same image). Store it on the record and returnsha256:<digest>asaux.ID.-ttags, so their copied records inherit the digest.imageDisplayID/findImageByID, so inspect/list/df/history of a built image show the real digest anddocker inspect <digest>resolves.Note
The
computeConfigDigestfor a build re-tars the rootfs (an extra pass on top of the build's own finalize IO). Build is already heavy, so this is acceptable; a pre-tar optimization (reusing the layer sha the build already produces) is a possible future refinement.Testing
The build handler needs infra (like the existing build tests); the digest helpers (
computeConfigDigest,imageDisplayID,findImageByID) are unit-tested in #126.go test ./...,go vet,gofmt,go buildclean. Merge only on verified-green CI.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.