-
Notifications
You must be signed in to change notification settings - Fork 591
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
IPFS for downloading images, using decentralized peer-to-peer #2407
Comments
Best case scenario, where both images and archives are found in local diskstore:
When In either case, the digest is verified before putting in the cache (with the url as key) |
It is still possible to use images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240423/ubuntu-24.04-server-cloudimg-amd64.img"
arch: "x86_64"
digest: "sha256:32a9d30d18803da72f5936cf2b7b9efcb4d0bb63c67933f17e3bdfd1751de3f3"
cid: bafybeig5sch22ecfox7gq724rz7uivydwvnnpuqdcnjz72iwelgtrakzui
- location: "https://cloud-images.ubuntu.com/releases/24.04/release-20240423/ubuntu-24.04-server-cloudimg-arm64.img"
arch: "aarch64"
digest: "sha256:c841bac00925d3e6892d979798103a867931f255f28fefd9d5e07e3e22d0ef22"
cid: bafybeidyzm3zkljztw3xqqjjapcqzsr4odz4evnmk4kfhdmmgird6citbi
# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img"
arch: "x86_64"
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img"
arch: "aarch64" archives:
- location: "https://github.com/containerd/nerdctl/releases/download/v1.7.6/nerdctl-full-1.7.6-linux-amd64.tar.gz"
arch: "x86_64"
digest: "sha256:2c841e097fcfb5a1760bd354b3778cb695b44cd01f9f271c17507dc4a0b25606"
cid: bafybeieipdaxd3fzy3j7syzzxdaqxramk65j7ajzcqgmi6b5jyq4jgbwue
- location: "https://github.com/containerd/nerdctl/releases/download/v1.7.6/nerdctl-full-1.7.6-linux-arm64.tar.gz"
arch: "aarch64"
digest: "sha256:77c747f09853ee3d229d77e8de0dd3c85622537d82be57433dc1fca4493bab95"
cid: bafybeibptqoynryoxytxffgyuqjnmwpuujwp6wlps4spygapuwphzkeieq
# No arm-v7
# No riscv64 That means that it can share the digest (and the cache) with the |
The secret command to calculate the "cid" (IPFS's Content-ID) is:
The digest (sha256) is still needed, as well*. CIDv1 is the new default. * https://docs.ipfs.tech/concepts/content-addressing/#cids-are-not-file-hashes If wanting to use only Then probably You can leave out the But then the output is less suitable for automation, including an |
Description
It should be possible to upload the images to IPFS, and then use such an address to download them p2p (by cid):
ipfs://bafybeig5sch22ecfox7gq724rz7uivydwvnnpuqdcnjz72iwelgtrakzui/ubuntu-24.04-server-cloudimg-amd64.img
CLI: https://docs.ipfs.tech/how-to/kubo-basic-cli/#install-kubo
GUI: https://docs.ipfs.tech/how-to/desktop-app/#install-ipfs-desktop
Implementation itself should be similar to ORAS: #2405
Setting up a hosting network is a completely different story.
Using an external
ipfs
tool on purpose, to cut down on dependencies.It would be possible to use github.com/ipfs/kubo directly, as a "library".
The text was updated successfully, but these errors were encountered: