NAME

Podman::Containers - Manage containers.

SYNOPSIS

# 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;

DESCRIPTION

Inheritance

Podman::Containers
    isa Podman::Client

Podman::Containers lists all available containers and prunes stopped ones.

ATTRIBUTES

Podman::Containers implements following attributes.

names_only

If true, list returns Mojo::Collection of image names only, defaults to false.

METHODS

Podman::Containers implements following methods, which can be used as object or class methods.

list

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.

prune

Podman::Containers->->prune;

Prune all stopped containers.

AUTHORS

    Tobias Schäfer, <tschaefer@blackox.org>

COPYRIGHT AND LICENSE

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.