WWW-Docker

Perl client for the Docker Engine API.

Description

WWW::Docker is a pure Perl client for the Docker Engine API. It provides a clean object-oriented interface to manage Docker containers, images, networks, and volumes without the overhead of heavy HTTP client libraries.

Key Features

Installation

cpanm WWW::Docker

Or from source:

dzil build
dzil test
dzil install

Synopsis

use WWW::Docker;

# Connect to local Docker daemon via Unix socket
my $docker = WWW::Docker->new;

# Or connect to remote Docker daemon
my $docker = WWW::Docker->new(
    host => 'tcp://192.168.1.100:2375',
);

# System information
my $info = $docker->system->info;
my $version = $docker->system->version;

# Container management
my $containers = $docker->containers->list(all => 1);
my $result = $docker->containers->create(
    Image => 'nginx:latest',
    name  => 'my-nginx',
);
$docker->containers->start($result->{Id});

# Image operations
$docker->images->pull(fromImage => 'nginx', tag => 'latest');
my $images = $docker->images->list;

# Network and volume management
my $networks = $docker->networks->list;
my $volumes = $docker->volumes->list;

Documentation

Full documentation is available on CPAN.

Architecture

The distribution is organized into several layers:

Environment Variables

Repository

Author

Torsten Raudssus torsten@raudssus.de

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.