NAME
WWW::Docker::API::Networks - Docker Engine Networks API
VERSION
version 0.100
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.
client
Reference to WWW::Docker client. Weak reference to avoid circular dependencies.
list
my $networks = $networks->list;
List networks. Returns ArrayRef of WWW::Docker::Network objects.
inspect
my $network = $networks->inspect($id);
Get detailed information about a network. Returns WWW::Docker::Network object.
create
my $result = $networks->create(
Name => 'my-network',
Driver => 'bridge',
);
Create a network. Returns hashref with Id and Warning.
remove
$networks->remove($id);
Remove a network.
connect
$networks->connect($network_id, Container => $container_id);
Connect a container to a network.
disconnect
$networks->disconnect($network_id, Container => $container_id, Force => 1);
Disconnect a container from a network. Optional Force parameter.
prune
my $result = $networks->prune;
Delete unused networks. Returns hashref with NetworksDeleted.
SEE ALSO
WWW::Docker - Main Docker client
WWW::Docker::Network - Network entity class
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-www-docker/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de>
COPYRIGHT AND LICENSE
This software is copyright (c) 2025 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.