API-Docker

 view release on metacpan or  search on metacpan

lib/API/Docker/Role/Entity/Image.pm  view on Meta::CPAN


Every method here forwards to L<API::Docker::API::Images> with the image's
own C<id> and returns whatever that method returns; the options are that
method's options, undocumented here on purpose so there is one place to
correct when the engine's are found to be something else.

The fields differ between the two classes -- see
L<API::Docker::API::Images/"The two image shapes"> for the differences that
have bitten.

Why the methods are a role applied to generated classes rather than a class
of their own: L<API::Docker::Role::Entity/DESCRIPTION>.

=head2 inspect

    my $full = $image->inspect;

Get fresh image information. Returns an L<API::Docker::Type::ImageInspect>
whatever the invocant was, so this is also how a C<list> entry is turned into
the full shape.

=head2 history

    my $history = $image->history;

Get image layer history. Delegates to L<API::Docker::API::Images/history>,
which hands back the daemon's ArrayRef unwrapped.

=head2 tag

    $image->tag(repo => 'myrepo/app', tag => 'v1');

Tag the image. Addresses it by C<id> (L<API::Docker::Type::ImageSummary/id>
/ L<API::Docker::Type::ImageInspect/id>, the same field on both), so this
works on an image with no C<repo_tags> at all.

=head2 remove

    $image->remove(force => 1);

Remove the image.

=head1 SEE ALSO

=over

=item * L<API::Docker::API::Images> - the operations these forward to

=item * L<API::Docker::Type::ImageSummary> - the fields C<list> returns

=item * L<API::Docker::Type::ImageInspect> - the fields C<inspect> returns

=item * L<API::Docker::Role::Entity> - why the methods live in a role

=back

=head1 SUPPORT

=head2 Issues

Please report bugs and feature requests on GitHub at
L<https://github.com/Getty/p5-api-docker/issues>.

=head1 CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

=head1 AUTHOR

Torsten Raudssus <getty@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> L<https://raudssus.de/>.

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

=cut



( run in 0.670 second using v1.01-cache-2.11-cpan-364913b4093 )