NAME
Podman::Container - Contol container.
SYNOPSIS
# Create container
my $Container = Podman::Container->Create('nginx', 'docker.io/library/nginx');
# Start container
$Container->Start();
# Stop container
$Container->Stop();
# Kill container
$Container->Kill();
DESCRIPTION
Podman::Container provides functionallity to control a container.
ATTRIBUTES
Name
my $Container = Podman::Image->new( Name => 'my_container' );
Unique image name or other identifier.
Client
my $Client = Podman::Client->new(
Connection => 'http+unix:///var/cache/podman.sock' );
my $Container = Podman::Container->new( Client => $Client );
Optional Podman::Client object.
METHODS
Create
my $Container = Podman::Container->Create(
'nginx',
'docker.io/library/nginx',
undef,
tty => 1,
interactive => 1,
);
Create named container by given image name. Optional arguments are Podman::Client object and further container options.
Inspect
my $Info = $Container->Inspect();
Return advanced container information.
Kill
$Container->Kill('SIGKILL');
Send signal to container, defaults to 'SIGTERM'.
Stop
$Container->Start();
Start stopped container.
Stop
$Container->Stop();
Stop running container.
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.