API-Docker

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    base64url-wrapped per the Docker Engine spec. Without `auth` the
    header carries an empty JSON object so unauthenticated/public
    pushes succeed where they previously failed at the HTTP layer.

0.001     2026-04-29 00:40:43Z
    - Initial release as API::Docker
    - Docker Engine API client with Unix socket and TCP support
    - Auto-negotiate API version from daemon
    - Container, Image, Network, Volume, System, and Exec APIs
    - Pure Perl implementation with minimal dependencies (no LWP)
    - HTTP/1.1 transport with chunked transfer encoding support

lib/API/Docker.pm  view on Meta::CPAN

  return $self->$orig($method, $path, %opts);
};


1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker - Perl client for the Docker Engine API

=head1 VERSION

version 0.002

=head1 SYNOPSIS

lib/API/Docker/API/Containers.pm  view on Meta::CPAN

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker::API::Containers - Docker Engine Containers API

=head1 VERSION

version 0.002

=head1 SYNOPSIS

lib/API/Docker/API/Exec.pm  view on Meta::CPAN

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker::API::Exec - Docker Engine Exec API

=head1 VERSION

version 0.002

=head1 SYNOPSIS

lib/API/Docker/API/Images.pm  view on Meta::CPAN

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker::API::Images - Docker Engine Images API

=head1 VERSION

version 0.002

=head1 SYNOPSIS

lib/API/Docker/API/Networks.pm  view on Meta::CPAN

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker::API::Networks - Docker Engine Networks API

=head1 VERSION

version 0.002

=head1 SYNOPSIS

lib/API/Docker/API/System.pm  view on Meta::CPAN

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker::API::System - Docker Engine System API

=head1 VERSION

version 0.002

=head1 SYNOPSIS

lib/API/Docker/API/Volumes.pm  view on Meta::CPAN

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker::API::Volumes - Docker Engine Volumes API

=head1 VERSION

version 0.002

=head1 SYNOPSIS

lib/API/Docker/Container.pm  view on Meta::CPAN

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker::Container - Docker container entity

=head1 VERSION

version 0.002

=head1 SYNOPSIS

lib/API/Docker/Image.pm  view on Meta::CPAN

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker::Image - Docker image entity

=head1 VERSION

version 0.002

=head1 SYNOPSIS

lib/API/Docker/Network.pm  view on Meta::CPAN

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker::Network - Docker network entity

=head1 VERSION

version 0.002

=head1 SYNOPSIS

lib/API/Docker/Role/HTTP.pm  view on Meta::CPAN

  my %headers;
  while (my $line = <$sock>) {
    $line =~ s/\r?\n$//;
    last if $line eq '';
    if ($line =~ /^([^:]+):\s*(.*)$/) {
      $headers{lc $1} = $2;
    }
  }

  my $body = '';
  if ($headers{'transfer-encoding'} && $headers{'transfer-encoding'} eq 'chunked') {
    $body = $self->_read_chunked($sock);
  }
  elsif (defined $headers{'content-length'}) {
    my $len = $headers{'content-length'};
    if ($len > 0) {
      my $read = 0;
      while ($read < $len) {
        my $buf;
        my $n = read($sock, $buf, $len - $read);
        last unless $n;

lib/API/Docker/Role/HTTP.pm  view on Meta::CPAN

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker::Role::HTTP - HTTP transport role for Docker Engine API

=head1 VERSION

version 0.002

=head1 SYNOPSIS

lib/API/Docker/Role/HTTP.pm  view on Meta::CPAN

heavy HTTP client libraries like LWP.

Features:

=over

=item * Unix socket transport (C<unix://...>)

=item * TCP socket transport (C<tcp://host:port>)

=item * HTTP/1.1 chunked transfer encoding

=item * Automatic JSON encoding/decoding

=item * Request/response logging via L<Log::Any>

=item * Automatic connection management

=back

Consuming classes must provide C<host> and C<api_version> attributes.

=head2 get

lib/API/Docker/Volume.pm  view on Meta::CPAN

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::Docker::Volume - Docker volume entity

=head1 VERSION

version 0.002

=head1 SYNOPSIS

t/release-changes_has_content.t  view on Meta::CPAN

    exit
  }
}

use Test::More tests => 2;

note 'Checking Changes';
my $changes_file = 'Changes';
my $newver = '0.002';
my $trial_token = '-TRIAL';
my $encoding = 'UTF-8';

SKIP: {
    ok(-e $changes_file, "$changes_file file exists")
        or skip 'Changes is missing', 1;

    ok(_get_changes($newver), "$changes_file has content for $newver");
}

done_testing;

sub _get_changes
{
    my $newver = shift;

    # parse changelog to find commit message
    open(my $fh, '<', $changes_file) or die "cannot open $changes_file: $!";
    my $changelog = join('', <$fh>);
    if ($encoding) {
        require Encode;
        $changelog = Encode::decode($encoding, $changelog, Encode::FB_CROAK());
    }
    close $fh;

    my @content =
        grep { /^$newver(?:$trial_token)?(?:\s+|$)/ ... /^\S/ } # from newver to un-indented
        split /\n/, $changelog;
    shift @content; # drop the version line

    # drop unindented last line and trailing blank lines
    pop @content while ( @content && $content[-1] =~ /^(?:\S|\s*$)/ );



( run in 2.054 seconds using v1.01-cache-2.11-cpan-9169edd2b0e )