NAME

Container::Builder::Layer - Class for Container::Builder layers.

DESCRIPTION

Container::Builder::Layer provides an abstract class for Container::Builder layers.

METHODS

new(comment => 'this is a layer')

Create a Container::Builder::Layer object. The comment argument is put inside the Container config JSON so that tools like dive can show a meaningful name for the layer.

generate_artifact()

This method is called in the Container::Builder to generate the artifact that will be put in the container image. It needs to return a valid layer (TAR or TAR GZIP).

get_comment()

Return the comment that was passed in the constructor.

get_media_type()

Return the media type of the container. This is the mime type of the layer. Possibilities are application/vnd.oci.image.layer.v1.tar or application/vnd.oci.image.layer.v1.tar+gzip.

get_digest()

Returns the SHA256 digest of the generated layer.

get_size()

Returns the size (length) of the generated layer.

AUTHOR

Adriaan Dens <adri@cpan.org>

COPYRIGHT

Copyright 2026- Adriaan Dens

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Part of the Container::Builder module.
https://github.com/opencontainers/image-spec/blob/main/layer.md