libcloud.container.utils package¶
Submodules¶
libcloud.container.utils.docker module¶
-
class
libcloud.container.utils.docker.
RegistryClient
(host, username=None, password=None, **kwargs)[source]¶ Bases:
object
A client for the Docker v2 registry API
Construct a Docker registry client
Parameters: - host (
str
) – Your registry endpoint, e.g. ‘registry.hub.docker.com’ - username (
str
) – (optional) Your registry account username - password (
str
) – (optional) Your registry account password
-
connectionCls
¶ alias of
DockerHubConnection
-
get_image
(repository_name, tag='latest', namespace='library')[source]¶ Get an image from a repository with a specific tag
Parameters: - repository_name (
str
) – The name of the repository, e.g. ubuntu - tag (
str
) – (optional) The image tag (defaults to latest) - namespace (
str
) – (optional) The docker namespace
Returns: A container image
Return type: - repository_name (
-
get_repository
(repository_name, namespace='library')[source]¶ Get the information about a specific repository
Parameters: - repository_name (
str
) – The name of the repository e.g. ‘ubuntu’ - namespace (
str
) – (optional) The docker namespace
Returns: The details of the repository
Return type: object
- repository_name (
-
list_images
(repository_name, namespace='library', max_count=100)[source]¶ List the tags (versions) in a repository
Parameters: - repository_name (
str
) – The name of the repository e.g. ‘ubuntu’ - namespace (
str
) – (optional) The docker namespace - max_count (
int
) – The maximum number of records to return
Returns: A list of images
Return type: - repository_name (
- host (
-
class
libcloud.container.utils.docker.
HubClient
(username=None, password=None, **kwargs)[source]¶ Bases:
libcloud.container.utils.docker.RegistryClient
A client for the Docker Hub API
The hub is based on the v2 registry API
Construct a Docker hub client
Parameters: - username (
str
) – (optional) Your Hub account username - password (
str
) – (optional) Your hub account password
-
host
= 'registry.hub.docker.com'¶
- username (