SYNOPSIS

my $docker = WWW::Docker->new;

# Create a network
my $result = $docker->networks->create(
    Name   => 'my-network',
    Driver => 'bridge',
);

# List networks
my $networks = $docker->networks->list;

# Connect/disconnect containers
$docker->networks->connect($network_id, Container => $container_id);
$docker->networks->disconnect($network_id, Container => $container_id);

# Remove network
$docker->networks->remove($network_id);

DESCRIPTION

This module provides methods for managing Docker networks including creation, listing, connecting containers, and removal.

Accessed via $docker->networks.

Reference to WWW::Docker client. Weak reference to avoid circular dependencies.

my $networks = $networks->list;

List networks. Returns ArrayRef of WWW::Docker::Network objects.

my $network = $networks->inspect($id);

Get detailed information about a network. Returns WWW::Docker::Network object.

my $result = $networks->create(
    Name   => 'my-network',
    Driver => 'bridge',
);

Create a network. Returns hashref with Id and Warning.

$networks->remove($id);

Remove a network.

$networks->connect($network_id, Container => $container_id);

Connect a container to a network.

$networks->disconnect($network_id, Container => $container_id, Force => 1);

Disconnect a container from a network. Optional Force parameter.

my $result = $networks->prune;

Delete unused networks. Returns hashref with NetworksDeleted.

9 POD Errors

The following errors were encountered while parsing the POD:

Around line 46:

Unknown directive: =attr

Around line 73:

Unknown directive: =method

Around line 88:

Unknown directive: =method

Around line 103:

Unknown directive: =method

Around line 120:

Unknown directive: =method

Around line 135:

Unknown directive: =method

Around line 150:

Unknown directive: =method

Around line 165:

Unknown directive: =method

Around line 173:

Unknown directive: =seealso