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.cr
v1/tarball/layer.cr
v1/tarball/tarball.cr
v1/tarball/write.cr

Instance Method Summary

Instance Method Detail

def dedup_ref_to_image(ref_to_image : ::Hash(Name::References, V1::Image)) #

[View source]
def image(opener : Opener, tag : Name::Tag?) #

image exposes an image from the tarball at the provided path.


[View source]
def image_from_path(path : String, tag : Name::Tag?) #

image_from_path returns a V1::Image from a tarball located on path.


[View source]
def 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. 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.


[View source]
def 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. This is just syntactic sugar wrapping tarball.MultiRefWrite with a new file.


[View source]
def 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. 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.


[View source]
def 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. This is just syntactic sugar wrapping tarball.MultiWrite with a new file.


[View source]
def path_opener(path : String) #

[View source]
def write(ref : Name::References, img : V1::Image, w : IO) #

Write is a wrapper to write a single image and tag to a tarball.


[View source]
def write_tar_entry(tf : Crystar::Writer, path : String, r : IO, size : Int64) #

write a file to the provided writer with a corresponding tar header


[View source]
def write_to_file(path : String, ref : Name::References, img : V1::Image) #

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.


[View source]