module V1::Tarball
Overview
Module Tarball provides facilities for reading/writing v1.Images from/to a tarball on-disk.
Extended Modules
Defined in:
v1/tarball/image.crv1/tarball/layer.cr
v1/tarball/tarball.cr
v1/tarball/write.cr
Instance Method Summary
- #dedup_ref_to_image(ref_to_image : ::Hash(Name::References, V1::Image))
-
#image(opener : Opener, tag : Name::Tag?)
image exposes an image from the tarball at the provided path.
-
#image_from_path(path : String, tag : Name::Tag?)
image_from_path returns a V1::Image from a tarball located on path.
-
#multi_ref_write(ref_to_image : ::Hash(Name::References, V1::Image), w : IO)
multi_ref_write writes the contents of each image to the provided reader, in the compressed format.
-
#multi_ref_write_to_file(path : String, ref_to_image : ::Hash(Name::References, V1::Image))
multi_ref_write_to_file writes in the compressed format to a tarball, on disk.
-
#multi_write(tag_to_image : ::Hash(Name::Tag, V1::Image), w : IO)
multi_write writes the contents of each image to the provided reader, in the compressed format.
-
#multi_write_to_file(path : String, tag_to_image : ::Hash(Name::Hash, V1::Image))
multi_write_to_file writes in the compressed format to a tarball, on disk.
- #path_opener(path : String)
-
#write(ref : Name::References, img : V1::Image, w : IO)
Write is a wrapper to write a single image and tag to a tarball.
-
#write_tar_entry(tf : Crystar::Writer, path : String, r : IO, size : Int64)
write a file to the provided writer with a corresponding tar header
-
#write_to_file(path : String, ref : Name::References, img : V1::Image)
write_to_file writes in the compressed format to a tarball, on disk.
Instance Method Detail
image exposes an image from the tarball at the provided path.
image_from_path returns a V1::Image from a tarball located on path.
multi_ref_write writes the contents of each image to the provided reader, in the compressed format. The contents are written in the following format: One manifest.json file at the top level containing information about several images. One file for each layer, named after the layer's SHA. One file for the config blob, named after its SHA.
multi_ref_write_to_file writes in the compressed format to a tarball, on disk. This is just syntactic sugar wrapping tarball.MultiRefWrite with a new file.
multi_write writes the contents of each image to the provided reader, in the compressed format. The contents are written in the following format: One manifest.json file at the top level containing information about several images. One file for each layer, named after the layer's SHA. One file for the config blob, named after its SHA.
multi_write_to_file writes in the compressed format to a tarball, on disk. This is just syntactic sugar wrapping tarball.MultiWrite with a new file.
Write is a wrapper to write a single image and tag to a tarball.
write a file to the provided writer with a corresponding tar header
write_to_file writes in the compressed format to a tarball, on disk. This is just syntactic sugar wrapping tarball.Write with a new file.