API-Docker
view release on metacpan or search on metacpan
lib/API/Docker/API/Volumes.pm view on Meta::CPAN
=head2 create
my $volume = $volumes->create(
Name => 'my-volume',
Driver => 'local',
);
Create a volume. Returns an L<API::Docker::Type::Volume> -- the only creating
method in this distribution that wraps its response, because the swagger
answers C<POST /volumes/create> with the same definition an inspect returns.
=head2 inspect
my $volume = $volumes->inspect('my-volume');
Get detailed information about a volume. Returns an
L<API::Docker::Type::Volume> -- the same class L</list> and L</create>
return, since the swagger describes a volume one way.
=head2 remove
$volumes->remove('my-volume', force => 1);
Remove a volume. Optional C<force> parameter.
=head2 prune
my $result = $volumes->prune;
my $result = $volumes->prune(filters => { label => ['stage=build'] });
Delete unused volumes. Returns hashref with C<VolumesDeleted> and C<SpaceReclaimed>.
Options:
=over
=item * C<filters> - HashRef of filter name to ArrayRef of string values; the
engine accepts C<label> here. Shape-checked and normalised by
L<API::Docker::Role::Filters>
=back
=head1 SEE ALSO
=over
=item * L<API::Docker> - Main Docker client
=item * L<API::Docker::Role::Entity::Volume> - the convenience methods the
returned objects carry
=item * L<API::Docker::Type::Volume> - the fields C<list>, C<inspect> and
C<create> return
=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.521 second using v1.01-cache-2.11-cpan-364913b4093 )