Перейти к содержимому

OCI Images by Hand: Take One Apart, Push One with curl

DevOps & SRE Notes

0:00 / 0:00

OCI Images by Hand: Take One Apart, Push One with curl

300 просмотров · 8 дн. назад
DevOps & SRE Notes
107 подписчиков
300 просмотров · 8 дн. назад
What does docker push (or podman push) actually send, and what does a registry keep? Less than you'd think. An image is a handful of files: a JSON manifest, a JSON config and a few tar.gz layers, each named by the sha256 of its bytes. Push and pull are a few plain HTTP requests. In this video I start a local zot registry, push a tiny image with podman and read zot's request log to see exactly what went over the wire. Then I take the image apart with curl and jq, pull it by hand and run it in a chroot, pack a new layer with tar, upload it with POST, PATCH and PUT, write a new config and manifest, and push them with curl. podman then pulls and runs the image that curl pushed. Finally, the image is copied to another repository without uploading a single byte. Links: Read more: https://tutunak.com/blog/oci-by-hand-... Telegram channel "DevOps & SRE notes": https://t.me/devops_sre_notes zot: https://zotregistry.dev OCI image spec: https://github.com/opencontainers/ima... OCI distribution spec: https://github.com/opencontainers/dis...