Podman::Containers - Manage containers.
# List available containers sorted by Id my $containers = Podman::Containers->new->list->sort(sub { $a->inspect->{Id} cmp $b->inspect->{Id} } ); say $_->name for $containers->each; # Prune unused containers Podman::Containers->prune;
Podman::Containers isa Podman::Client
Podman::Containers lists all available containers and prunes stopped ones.
Podman::Containers implements following attributes.
If true, list returns Mojo::Collection of image names only, defaults to false.
true
list
false
Podman::Containers implements following methods, which can be used as object or class methods.
my $list = Podman::Containers->list(names_only => 1);
Returns a Mojo::Collection of Podman::Container objects or container names only of stored images. See attribute names_only.
names_only
Podman::Containers->->prune;
Prune all stopped containers.
Tobias Schäfer, <tschaefer@blackox.org>
Copyright (C) 2022-2022, Tobias Schäfer.
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
To install Podman, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Podman
CPAN shell
perl -MCPAN -e shell install Podman
For more information on module installation, please visit the detailed CPAN module installation guide.