| 1 | package Docker::Registry; | ||
| 2 | 6 | our $VERSION = '0.08'; | |
| 3 | |||
| 4 | 6 | 1; | |
| 5 | |||
| 6 | ### main pod documentation begin ### | ||
| 7 | |||
| 8 | =encoding UTF-8 | ||
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | Docker::Registry - A client for talking to Docker Registries | ||
| 13 | |||
| 14 | =head1 SYNOPSIS | ||
| 15 | |||
| 16 | # Use AWSs Elastic Container Registry | ||
| 17 | use Docker::Registry::ECR; | ||
| 18 | my $reg = Docker::Registry::ECR->new( | ||
| 19 | region => 'us-west-2', | ||
| 20 | account_id => '0123456789', | ||
| 21 | ); | ||
| 22 | my $repo_list = $reg->repositories; | ||
| 23 | |||
| 24 | # Use Google Container Registry (GCR) | ||
| 25 | use Docker::Registry::GCE; | ||
| 26 | my $reg = Docker::Registry::GCE->new; | ||
| 27 | my $repo_list $reg->repositories; | ||
| 28 | |||
| 29 | =head1 DESCRIPTION | ||
| 30 | |||
| 31 | This module helps you talk to different Docker Registries from different cloud | ||
| 32 | providers. | ||
| 33 | |||
| 34 | Docker Registry APIs are standard, but authentication methods differ from | ||
| 35 | vendor to vendor. This set of modules helps manage that for you. | ||
| 36 | |||
| 37 | =head1 WARNING | ||
| 38 | |||
| 39 | Consider this code Alpha quality. It works, but only some read-only methods | ||
| 40 | have been implemented, and the API may still change. Be careful if you start | ||
| 41 | depending on this module. | ||
| 42 | |||
| 43 | =head1 ATTRIBUTES | ||
| 44 | |||
| 45 | =head2 url | ||
| 46 | |||
| 47 | The URL of the registry. Most of the time this URL is automatically derived by | ||
| 48 | provider classes like (L<Docker::Registry::ECR>. | ||
| 49 | |||
| 50 | =head2 auth | ||
| 51 | |||
| 52 | An instance of an object that has the L<Docker::Registry::Auth> Role. See L</AUTHENTICATION> for | ||
| 53 | a list of authentication types. Subclasses (like L<Docker::Registry::GCE>) will set a default | ||
| 54 | authentication object appropriate for the specific provider. This is left injectable in the | ||
| 55 | constructor so the programmer can force a specific auth provider. | ||
| 56 | |||
| 57 | =head1 METHODS | ||
| 58 | |||
| 59 | =head2 repositories | ||
| 60 | |||
| 61 | Returns a L<Docker::Registry::Result::Repositories> object with the list of | ||
| 62 | repositories | ||
| 63 | |||
| 64 | =head2 repository_tags(name => $repo_name) | ||
| 65 | |||
| 66 | Returns a L<Docker::Registry::Result::RepositoryTags> object with the list of | ||
| 67 | tags | ||
| 68 | |||
| 69 | =head1 PROVIDERS | ||
| 70 | |||
| 71 | Different cloud providers of Docker registries have subtle differences between | ||
| 72 | them, so there are specialized classes for each supported provider: | ||
| 73 | |||
| 74 | L<Docker::Registry::Azure> | ||
| 75 | |||
| 76 | L<Docker::Registry::ECR> | ||
| 77 | |||
| 78 | L<Docker::Registry::GCE> | ||
| 79 | |||
| 80 | L<Docker::Registry::Gitlab> | ||
| 81 | |||
| 82 | =head1 AUTHENTICATION | ||
| 83 | |||
| 84 | Each registry class has it's authentication providers: | ||
| 85 | |||
| 86 | L<Docker::Registry::Auth::Basic> | ||
| 87 | |||
| 88 | L<Docker::Registry::Auth::ECR> | ||
| 89 | |||
| 90 | L<Docker::Registry::Auth::GCEServiceAccount> | ||
| 91 | |||
| 92 | L<Docker::Registry::Auth::Gitlab> | ||
| 93 | |||
| 94 | The most of the time the specialized provider tries to select the appropiate | ||
| 95 | authentication module, but it can be overrided with the C<auth> attribute | ||
| 96 | |||
| 97 | =head1 SEE ALSO | ||
| 98 | |||
| 99 | L<https://docs.docker.com/registry/spec/api/> | ||
| 100 | |||
| 101 | =head1 AUTHOR | ||
| 102 | |||
| 103 | Jose Luis Martinez | ||
| 104 | CAPSiDE | ||
| 105 | jlmartinez@capside.com | ||
| 106 | |||
| 107 | =head1 CONTRIBUTORS | ||
| 108 | |||
| 109 | Wesley Schwengle (waterkip) has implemented the GitLab provider, as well as | ||
| 110 | refactored code | ||
| 111 | |||
| 112 | For a full list of all the contributors see the CONTRIBUTORS file included in | ||
| 113 | this module. | ||
| 114 | |||
| 115 | =head1 BUGS and SOURCE | ||
| 116 | |||
| 117 | The source code is located here: L<https://github.com/pplu/docker-registry> | ||
| 118 | |||
| 119 | Please report bugs to: L<https://github.com/pplu/docker-registry/issues> | ||
| 120 | |||
| 121 | =head1 COPYRIGHT and LICENSE | ||
| 122 | |||
| 123 | Copyright (c) 2018 by CAPSiDE | ||
| 124 | This code is distributed under the Apache 2 License. The full text of the | ||
| 125 | license can be found in the LICENSE file included with this module. | ||
| 126 | |||
| 127 | =cut |