-
Notifications
You must be signed in to change notification settings - Fork 6
Update node image #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,6 +27,7 @@ build-bootc-image: | |||||||||||||||
| build-disk-image: build-bootc-image | ||||||||||||||||
| @echo "=== Building node image with qcow2 disk ===" | ||||||||||||||||
| STORAGE_PATH=$$(podman info --format '{{.Store.GraphRoot}}') && \ | ||||||||||||||||
| BOOTC_DIGEST=$$(podman inspect --format '{{.Digest}}' $(BOOTC_IMAGE)) && \ | ||||||||||||||||
| podman build \ | ||||||||||||||||
|
Comment on lines
29
to
31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Consider using a more robust inspect format for the image digest or handling the case where
Suggested change
|
||||||||||||||||
| --cap-add=SYS_ADMIN \ | ||||||||||||||||
| --cap-add=DAC_READ_SEARCH \ | ||||||||||||||||
|
|
@@ -40,6 +41,7 @@ build-disk-image: build-bootc-image | |||||||||||||||
| --build-arg DISK_SIZE="$(DISK_SIZE)" \ | ||||||||||||||||
| --build-arg MEMORY="$(BUILD_MEMORY)" \ | ||||||||||||||||
| --build-arg KUBE_MINOR="$(KUBE_MINOR)" \ | ||||||||||||||||
| --build-arg BOOTC_DIGEST="$$BOOTC_DIGEST" \ | ||||||||||||||||
| -t $(NODE_IMAGE) \ | ||||||||||||||||
| -f Containerfile.disk \ | ||||||||||||||||
| . | ||||||||||||||||
|
|
||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, the problem with this is that we haven't pushed the bootc image yet so we don't have the actual pushed digest. At push time, layers are compressed which will yield a different manifest digest than what we get here.
So I think this would require building the bootc image, pushing it (use
podman push --digestfile foo ...) and then build the disk image (and the BOOTC_DIGEST would be$(cat foo)).Alternatively... don't worry about digests, and just use tags. Derive the tag name from the date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmh maybe I'm missing something but the label is correct and matches what bootc reports. Example:
podman inspect --format '{{index .Config.Labels "bink.bootc-image-digest"}}' ghcr.io/alicefr/bink/node:v1.35-fedora-44-disk sha256:903caa303fbf9db5250c7943b63a44f774b9c52b825d0e7865672e9cf11ce09dOn a booted node started with --node-image corresponding to the one we just inspected: