This commit is contained in:
Ivan Milev 2025-06-11 11:58:21 +02:00 committed by GitHub
commit 69f493ca71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 1648 additions and 0 deletions

View File

@ -0,0 +1,205 @@
```mermaid
graph LR
AuthenticationManager["AuthenticationManager"]
CredentialStoreInterface["CredentialStoreInterface"]
DockerContextManager["DockerContextManager"]
APIClient["APIClient"]
DockerAPIMixins["DockerAPIMixins"]
UtilityFunctions["UtilityFunctions"]
ErrorHandling["ErrorHandling"]
TransportAdapters["TransportAdapters"]
TLSConfiguration["TLSConfiguration"]
DockerTypes["DockerTypes"]
APIClient -- "configures" --> TransportAdapters
APIClient -- "depends on" --> UtilityFunctions
APIClient -- "integrates with" --> AuthenticationManager
APIClient -- "reports" --> ErrorHandling
DockerAPIMixins -- "leverages" --> AuthenticationManager
DockerAPIMixins -- "utilizes" --> UtilityFunctions
DockerAPIMixins -- "defines/raises" --> ErrorHandling
DockerAPIMixins -- "operates on" --> DockerTypes
AuthenticationManager -- "accesses" --> CredentialStoreInterface
AuthenticationManager -- "relies on" --> UtilityFunctions
AuthenticationManager -- "generates" --> ErrorHandling
CredentialStoreInterface -- "can raise" --> ErrorHandling
DockerContextManager -- "configures" --> TLSConfiguration
DockerContextManager -- "uses" --> UtilityFunctions
DockerContextManager -- "produces" --> ErrorHandling
```
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
## Component Details
This graph illustrates the core components involved in Docker client operations, focusing on authentication, configuration, and daemon communication. The `APIClient` serves as the primary interface, establishing connections via `TransportAdapters` and managing authentication through the `AuthenticationManager`, which interacts with `CredentialStoreInterface` for secure credential handling. Docker contexts, defining connection parameters, are managed by the `DockerContextManager`, which also handles `TLSConfiguration`. Various `DockerAPIMixins` extend the client's capabilities for specific Docker resources, utilizing `UtilityFunctions` for common tasks. The `ErrorHandling` component provides a centralized mechanism for reporting issues across the system.
### AuthenticationManager
Manages Docker authentication configurations, including loading from files, parsing credentials, resolving authentication details for specific registries, and encoding/decoding authentication headers. It interacts with credential stores to retrieve and store sensitive information.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L75-L306" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig` (75:306)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L144-L189" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig:load_config` (144:189)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L37-L56" target="_blank" rel="noopener noreferrer">`docker.auth.get_config_header` (37:56)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L348-L349" target="_blank" rel="noopener noreferrer">`docker.auth.load_config` (348:349)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L309-L312" target="_blank" rel="noopener noreferrer">`docker.auth.resolve_authconfig` (309:312)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L327-L329" target="_blank" rel="noopener noreferrer">`docker.auth.encode_header` (327:329)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L84-L141" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig:parse_auth` (84:141)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L209-L242" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig:resolve_authconfig` (209:242)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L244-L270" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig:_resolve_authconfig_credstore` (244:270)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L272-L277" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig:_get_store_instance` (272:277)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L285-L303" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig:get_all_credentials` (285:303)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L305-L306" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig:add_auth` (305:306)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L30-L34" target="_blank" rel="noopener noreferrer">`docker.auth.resolve_index_name` (30:34)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L315-L316" target="_blank" rel="noopener noreferrer">`docker.auth.convert_to_hostname` (315:316)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L319-L324" target="_blank" rel="noopener noreferrer">`docker.auth.decode_auth` (319:324)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L332-L345" target="_blank" rel="noopener noreferrer">`docker.auth.parse_auth` (332:345)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L352-L378" target="_blank" rel="noopener noreferrer">`docker.auth._load_legacy_config` (352:378)</a>
### CredentialStoreInterface
Provides an abstraction layer for interacting with external Docker credential helper programs, allowing the retrieval, storage, and listing of authentication credentials.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/credentials/store.py#L11-L93" target="_blank" rel="noopener noreferrer">`docker.credentials.store.Store` (11:93)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/credentials/store.py#L26-L44" target="_blank" rel="noopener noreferrer">`docker.credentials.store.Store:get` (26:44)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/credentials/store.py#L46-L55" target="_blank" rel="noopener noreferrer">`docker.credentials.store.Store:store` (46:55)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/credentials/store.py#L57-L63" target="_blank" rel="noopener noreferrer">`docker.credentials.store.Store:erase` (57:63)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/credentials/store.py#L65-L69" target="_blank" rel="noopener noreferrer">`docker.credentials.store.Store:list` (65:69)</a>
### DockerContextManager
Handles the lifecycle and management of Docker contexts, which define connection parameters and configurations for different Docker daemon endpoints. This includes creating, loading, saving, inspecting, and removing contexts, as well as managing associated TLS certificates.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L16-L249" target="_blank" rel="noopener noreferrer">`docker.context.context.Context` (16:249)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L19-L60" target="_blank" rel="noopener noreferrer">`docker.context.context.Context:__init__` (19:60)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L62-L73" target="_blank" rel="noopener noreferrer">`docker.context.context.Context:set_endpoint` (62:73)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L75-L76" target="_blank" rel="noopener noreferrer">`docker.context.context.Context:inspect` (75:76)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L79-L90" target="_blank" rel="noopener noreferrer">`docker.context.context.Context:load_context` (79:90)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L93-L118" target="_blank" rel="noopener noreferrer">`docker.context.context.Context:_load_meta` (93:118)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L120-L144" target="_blank" rel="noopener noreferrer">`docker.context.context.Context:_load_certs` (120:144)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L146-L171" target="_blank" rel="noopener noreferrer">`docker.context.context.Context:save` (146:171)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L182-L183" target="_blank" rel="noopener noreferrer">`docker.context.context.Context:__str__` (182:183)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L173-L177" target="_blank" rel="noopener noreferrer">`docker.context.context.Context:remove` (173:177)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L15-L206" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI` (15:206)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L23-L70" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI:create_context` (23:70)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L73-L98" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI:get_context` (73:98)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L101-L125" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI:contexts` (101:125)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L128-L133" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI:get_current_context` (128:133)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L136-L144" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI:set_current_context` (136:144)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L147-L177" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI:remove_context` (147:177)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L180-L206" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI:inspect_context` (180:206)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/config.py#L75-L81" target="_blank" rel="noopener noreferrer">`docker.context.config.get_context_host` (75:81)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/config.py#L57-L61" target="_blank" rel="noopener noreferrer">`docker.context.config.get_meta_dir` (57:61)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/config.py#L64-L65" target="_blank" rel="noopener noreferrer">`docker.context.config.get_meta_file` (64:65)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/config.py#L68-L72" target="_blank" rel="noopener noreferrer">`docker.context.config.get_tls_dir` (68:72)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/config.py#L12-L21" target="_blank" rel="noopener noreferrer">`docker.context.config.get_current_context_name` (12:21)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/config.py#L24-L46" target="_blank" rel="noopener noreferrer">`docker.context.config.write_context_name_to_docker_config` (24:46)</a>
### APIClient
The core client component responsible for establishing and managing connections to the Docker daemon. It handles initial configuration loading, proxy settings, transport layer selection (Unix socket, Npipe, SSH), and server version negotiation.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L57-L532" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient` (57:532)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L115-L219" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:__init__` (115:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L518-L532" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:reload_config` (518:532)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L501-L503" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient._unmount` (501:503)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L221-L232" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient._retrieve_server_version` (221:232)</a>
### DockerAPIMixins
A collection of mixin classes that extend the core API client with specific functionalities for interacting with different Docker resources, such as daemon, build, plugin, service, and image operations. These mixins often integrate with authentication and utility functions.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/daemon.py#L97-L152" target="_blank" rel="noopener noreferrer">`docker.api.daemon.DaemonApiMixin:login` (97:152)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/build.py#L321-L352" target="_blank" rel="noopener noreferrer">`docker.api.build.BuildApiMixin:_set_auth_headers` (321:352)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L106-L141" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:pull_plugin` (106:141)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L155-L181" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:plugin_privileges` (155:181)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L185-L205" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:push_plugin` (185:205)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L229-L261" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:upgrade_plugin` (229:261)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L116-L189" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:create_service` (116:189)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L369-L486" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:update_service` (369:486)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L193-L219" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin.inspect_service` (193:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L5-L96" target="_blank" rel="noopener noreferrer">`docker.api.service._check_api_features` (5:96)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L99-L111" target="_blank" rel="noopener noreferrer">`docker.api.service._merge_task_template` (99:111)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L257-L289" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin:inspect_distribution` (257:289)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L351-L434" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin:pull` (351:434)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L436-L500" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin:push` (436:500)</a>
### UtilityFunctions
Provides a set of general-purpose helper functions used across the docker-py library for tasks such as configuration file discovery, proxy settings parsing, version comparison, and decorator application for API methods.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/config.py#L13-L30" target="_blank" rel="noopener noreferrer">`docker.utils.config.find_config_file` (13:30)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/config.py#L51-L66" target="_blank" rel="noopener noreferrer">`docker.utils.config.load_general_config` (51:66)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/proxy.py#L25-L38" target="_blank" rel="noopener noreferrer">`docker.utils.proxy.ProxyConfig.from_dict` (25:38)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L233-L321" target="_blank" rel="noopener noreferrer">`docker.utils.utils.parse_host` (233:321)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L77-L78" target="_blank" rel="noopener noreferrer">`docker.utils.utils.version_lt` (77:78)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L209-L220" target="_blank" rel="noopener noreferrer">`docker.utils.utils.convert_service_networks` (209:220)</a>
- `docker.utils.utils` (full file reference)
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/decorators.py#L24-L34" target="_blank" rel="noopener noreferrer">`docker.utils.decorators.minimum_version` (24:34)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/decorators.py#L7-L21" target="_blank" rel="noopener noreferrer">`docker.utils.decorators.check_resource` (7:21)</a>
### ErrorHandling
Centralized component for defining and raising specific exceptions related to Docker operations, configuration issues, authentication failures, and context management.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L108-L109" target="_blank" rel="noopener noreferrer">`docker.errors.InvalidConfigFile` (108:109)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L13-L19" target="_blank" rel="noopener noreferrer">`docker.errors.DockerException` (13:19)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/credentials/errors.py#L5-L6" target="_blank" rel="noopener noreferrer">`docker.credentials.errors.CredentialsNotFound` (5:6)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L196-L201" target="_blank" rel="noopener noreferrer">`docker.errors.ContextException` (196:201)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L180-L185" target="_blank" rel="noopener noreferrer">`docker.errors.MissingContextParameter` (180:185)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L188-L193" target="_blank" rel="noopener noreferrer">`docker.errors.ContextAlreadyExists` (188:193)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L204-L209" target="_blank" rel="noopener noreferrer">`docker.errors.ContextNotFound` (204:209)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L120-L128" target="_blank" rel="noopener noreferrer">`docker.errors.TLSParameterError` (120:128)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L100-L101" target="_blank" rel="noopener noreferrer">`docker.errors.InvalidVersion` (100:101)</a>
### TransportAdapters
Manages the underlying HTTP transport mechanisms for communicating with the Docker daemon, supporting various connection types like Unix sockets, named pipes (Npipe), and SSH.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py#L45-L86" target="_blank" rel="noopener noreferrer">`docker.transport.unixconn.UnixHTTPAdapter` (45:86)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipeconn.py#L64-L102" target="_blank" rel="noopener noreferrer">`docker.transport.npipeconn.NpipeHTTPAdapter` (64:102)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L159-L250" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHHTTPAdapter` (159:250)</a>
### TLSConfiguration
Handles the configuration and management of Transport Layer Security (TLS) settings for secure communication with the Docker daemon.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/tls.py#L6-L67" target="_blank" rel="noopener noreferrer">`docker.tls.TLSConfig` (6:67)</a>
### DockerTypes
Defines data structures and models for various Docker objects, such as service modes, used in API interactions.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L595-L660" target="_blank" rel="noopener noreferrer">`docker.types.services.ServiceMode` (595:660)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

View File

@ -0,0 +1,111 @@
```mermaid
graph LR
Build_System["Build System"]
Build_Context_Preparation["Build Context Preparation"]
Authentication_Management["Authentication Management"]
API_Versioning_and_Decorators["API Versioning and Decorators"]
Stream_Processing["Stream Processing"]
Error_Handling["Error Handling"]
Build_System -- "Orchestrates" --> Build_Context_Preparation
Build_System -- "Utilizes" --> Authentication_Management
Build_System -- "Processes Output Via" --> Stream_Processing
Build_System -- "Raises" --> Error_Handling
Build_System -- "Enforces Compatibility Via" --> API_Versioning_and_Decorators
Build_Context_Preparation -- "Uses" --> Fnmatch_Utilities
```
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
## Component Details
This graph illustrates the core components and their interactions within the `docker-py` library's build system. The primary flow revolves around the `Build System` component, which orchestrates the entire image building process. It relies on `Build Context Preparation` to create the necessary build context, `Authentication Management` for handling registry credentials, and `Stream Processing` to interpret the real-time output from the Docker daemon. `API Versioning and Decorators` ensure compatibility with different Docker API versions, while `Error Handling` provides structured error reporting for various build-related issues.
### Build System
Manages the end-to-end process of building Docker images, including orchestrating context preparation, applying authentication, and processing build output streams. It serves as the primary interface for image creation within the `docker-py` library.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/build.py#L11-L352" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.build.BuildApiMixin` (11:352)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/build.py#L12-L275" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.build.BuildApiMixin:build` (12:275)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/build.py#L321-L352" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.build.BuildApiMixin:_set_auth_headers` (321:352)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/build.py#L355-L382" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.build.process_dockerfile` (355:382)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L220-L315" target="_blank" rel="noopener noreferrer">`docker-py.docker.models.images.ImageCollection:build` (220:315)</a>
### Build Context Preparation
Responsible for preparing the local build context for Docker image creation. This includes archiving the necessary files and directories, applying exclusion rules from `.dockerignore`, and ensuring the context is ready for transmission to the Docker daemon.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L70-L120" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.build:create_archive` (70:120)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L41-L55" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.build:exclude_paths` (41:55)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L22-L38" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.build:tar` (22:38)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L159-L219" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.build.PatternMatcher` (159:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L166-L183" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.build.PatternMatcher:matches` (166:183)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L58-L67" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.build.build_file_list` (58:67)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L123-L139" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.build.mkbuildcontext` (123:139)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/fnmatch.py#L26-L44" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.fnmatch:fnmatch` (26:44)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/fnmatch.py#L47-L60" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.fnmatch:fnmatchcase` (47:60)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/fnmatch.py#L63-L115" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.fnmatch:translate` (63:115)</a>
### Authentication Management
Handles the loading, parsing, and resolution of Docker authentication configurations. It provides mechanisms to retrieve credentials from various sources and format them for inclusion in API requests, particularly for pulling base images during a build.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L348-L349" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth:load_config` (348:349)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L75-L306" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.AuthConfig` (75:306)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L144-L189" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.AuthConfig.load_config` (144:189)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L285-L303" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.AuthConfig.get_all_credentials` (285:303)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L272-L277" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.AuthConfig._get_store_instance` (272:277)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L244-L270" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.AuthConfig._resolve_authconfig_credstore` (244:270)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L315-L316" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.convert_to_hostname` (315:316)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L327-L329" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.encode_header` (327:329)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L309-L312" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.resolve_authconfig` (309:312)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L319-L324" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.decode_auth` (319:324)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L332-L345" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.parse_auth` (332:345)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L352-L378" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth._load_legacy_config` (352:378)</a>
### API Versioning and Decorators
Provides utilities for comparing Docker API versions and implements decorators to enforce minimum API versions for client methods. This ensures that API calls are compatible with the connected Docker daemon and handles version-specific behaviors.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L77-L78" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.utils:version_lt` (77:78)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L81-L82" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.utils:version_gte` (81:82)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L49-L74" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.utils:compare_version` (49:74)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/decorators.py#L24-L34" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.decorators:minimum_version` (24:34)</a>
### Stream Processing
Manages the parsing and handling of streaming data, particularly JSON streams, received from the Docker daemon. This component is crucial for processing real-time output during long-running operations like image builds, enabling progress reporting and error detection.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/json_stream.py#L35-L40" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.json_stream:json_stream` (35:40)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/json_stream.py#L50-L74" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.json_stream:split_buffer` (50:74)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/json_stream.py#L9-L19" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.json_stream.stream_as_text` (9:19)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/json_stream.py#L43-L47" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.json_stream.line_splitter` (43:47)</a>
### Error Handling
Defines a hierarchy of custom exception classes used throughout the `docker-py` library. These exceptions represent specific error conditions encountered during interactions with the Docker daemon or due to invalid client-side operations, providing structured error reporting.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L100-L101" target="_blank" rel="noopener noreferrer">`docker-py.docker.errors.InvalidVersion` (100:101)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L13-L19" target="_blank" rel="noopener noreferrer">`docker-py.docker.errors.DockerException` (13:19)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L153-L155" target="_blank" rel="noopener noreferrer">`docker-py.docker.errors.StreamParseError` (153:155)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L158-L162" target="_blank" rel="noopener noreferrer">`docker-py.docker.errors.BuildError` (158:162)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

View File

@ -0,0 +1,140 @@
```mermaid
graph LR
Daemon_API_Handler["Daemon API Handler"]
Exec_API_Handler["Exec API Handler"]
Core_Docker_Client["Core Docker Client"]
General_Utilities["General Utilities"]
Authentication_Manager["Authentication Manager"]
Stream_Types["Stream Types"]
API_Error_Handling["API Error Handling"]
API_Decorators["API Decorators"]
Container_Object_Model["Container Object Model"]
Execution_Result_Model["Execution Result Model"]
Core_Docker_Client -- "delegates to" --> Daemon_API_Handler
Core_Docker_Client -- "delegates to" --> Exec_API_Handler
Daemon_API_Handler -- "uses" --> General_Utilities
Daemon_API_Handler -- "returns/uses" --> Stream_Types
Daemon_API_Handler -- "uses" --> Authentication_Manager
Exec_API_Handler -- "uses" --> API_Decorators
Exec_API_Handler -- "uses" --> General_Utilities
Exec_API_Handler -- "raises" --> API_Error_Handling
Exec_API_Handler -- "returns/uses" --> Stream_Types
Container_Object_Model -- "returns" --> Execution_Result_Model
Container_Object_Model -- "uses" --> Exec_API_Handler
```
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
## Component Details
This component overview describes the structure and interactions of the Docker daemon and execution operations subsystem. It details how the core client interacts with dedicated API handlers for daemon-level information and container command execution, leveraging various utility and model components for authentication, data streaming, error handling, and object representation.
### Daemon API Handler
Manages interactions with the Docker daemon for system-level information, real-time events, and user authentication.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/daemon.py#L7-L181" target="_blank" rel="noopener noreferrer">`docker.api.daemon.DaemonApiMixin` (7:181)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/daemon.py#L83-L95" target="_blank" rel="noopener noreferrer">`docker.api.daemon.DaemonApiMixin:info` (83:95)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/daemon.py#L24-L81" target="_blank" rel="noopener noreferrer">`docker.api.daemon.DaemonApiMixin:events` (24:81)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/daemon.py#L97-L152" target="_blank" rel="noopener noreferrer">`docker.api.daemon.DaemonApiMixin:login` (97:152)</a>
### Exec API Handler
Provides functionalities for creating and starting execution commands within Docker containers.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/exec_api.py#L5-L176" target="_blank" rel="noopener noreferrer">`docker.api.exec_api.ExecApiMixin` (5:176)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/exec_api.py#L7-L78" target="_blank" rel="noopener noreferrer">`docker.api.exec_api.ExecApiMixin:exec_create` (7:78)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/exec_api.py#L118-L176" target="_blank" rel="noopener noreferrer">`docker.api.exec_api.ExecApiMixin:exec_start` (118:176)</a>
### Core Docker Client
The primary entry point for users to interact with the Docker API, abstracting underlying API calls and delegating to specific API handlers.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L16-L219" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient` (16:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L184-L185" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:events` (184:185)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L192-L193" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:info` (192:193)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L196-L197" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:login` (196:197)</a>
### General Utilities
A collection of helper functions for data manipulation, filtering, command parsing, environment formatting, and version comparisons.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L1-L206" target="_blank" rel="noopener noreferrer">`docker.utils.utils` (1:206)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L405-L408" target="_blank" rel="noopener noreferrer">`docker.utils.utils.datetime_to_timestamp` (405:408)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L391-L402" target="_blank" rel="noopener noreferrer">`docker.utils.utils.convert_filters` (391:402)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L77-L78" target="_blank" rel="noopener noreferrer">`docker.utils.utils.version_lt` (77:78)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L486-L487" target="_blank" rel="noopener noreferrer">`docker.utils.utils.split_command` (486:487)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L490-L498" target="_blank" rel="noopener noreferrer">`docker.utils.utils.format_environment` (490:498)</a>
### Authentication Manager
Handles the loading, resolution, and management of Docker registry authentication configurations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L348-L349" target="_blank" rel="noopener noreferrer">`docker.auth.load_config` (348:349)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L75-L306" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig` (75:306)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L209-L242" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig.resolve_authconfig` (209:242)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L305-L306" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig.add_auth` (305:306)</a>
### Stream Types
Defines specialized data structures for managing cancellable data streams, typically used for real-time event monitoring.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/daemon.py#L8-L71" target="_blank" rel="noopener noreferrer">`docker.types.daemon.CancellableStream` (8:71)</a>
### API Error Handling
Provides specific error classes for handling exceptions related to Docker API version compatibility.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L100-L101" target="_blank" rel="noopener noreferrer">`docker.errors.InvalidVersion` (100:101)</a>
### API Decorators
Contains utility decorators used to apply common checks or transformations to API methods, such as resource validation.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/decorators.py#L7-L21" target="_blank" rel="noopener noreferrer">`docker.utils.decorators.check_resource` (7:21)</a>
### Container Object Model
Represents a Docker container object and offers methods to perform operations directly on a container instance, like executing commands.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L20-L529" target="_blank" rel="noopener noreferrer">`docker.models.containers.Container` (20:529)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L167-L224" target="_blank" rel="noopener noreferrer">`docker.models.containers.Container:exec_run` (167:224)</a>
### Execution Result Model
Encapsulates the outcome of an execution command performed within a Docker container.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L5-L8" target="_blank" rel="noopener noreferrer">`docker.models.containers.ExecResult` (5:8)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

View File

@ -0,0 +1,261 @@
```mermaid
graph LR
ClientCore["ClientCore"]
APIMixins["APIMixins"]
DockerDataTypes["DockerDataTypes"]
UtilityFunctions["UtilityFunctions"]
ErrorHandling["ErrorHandling"]
HighLevelModels["HighLevelModels"]
ClientCore -- "uses" --> UtilityFunctions
ClientCore -- "raises" --> ErrorHandling
ClientCore -- "uses" --> DockerDataTypes
APIMixins -- "uses" --> UtilityFunctions
APIMixins -- "creates/configures" --> DockerDataTypes
APIMixins -- "raises" --> ErrorHandling
DockerDataTypes -- "uses" --> UtilityFunctions
DockerDataTypes -- "raises" --> ErrorHandling
DockerDataTypes -- "uses" --> DockerDataTypes
UtilityFunctions -- "invokes" --> UtilityFunctions
UtilityFunctions -- "raises" --> ErrorHandling
HighLevelModels -- "uses" --> APIMixins
HighLevelModels -- "uses" --> DockerDataTypes
HighLevelModels -- "uses" --> UtilityFunctions
HighLevelModels -- "raises" --> ErrorHandling
```
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
## Component Details
The docker-py library provides a Pythonic interface to the Docker Engine API. The core functionality revolves around the ClientCore component, which establishes and manages connections to the Docker daemon. APIMixins then provide direct interaction with various Docker API endpoints, allowing for operations on containers, images, and volumes. DockerDataTypes define the structured data used for these API interactions, ensuring correct data formatting. UtilityFunctions offer a set of helper functions for common tasks like data parsing, version comparisons, and file handling, supporting both ClientCore and APIMixins. ErrorHandling centralizes custom exceptions for robust error management across the library. Finally, HighLevelModels build upon APIMixins to provide more abstract and user-friendly interfaces for common Docker operations.
### ClientCore
Manages the fundamental connection and configuration with the Docker daemon, including TLS settings, context loading, and establishing communication channels (Unix sockets, Npipe, SSH). It also handles initial server version retrieval and proxy configurations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L48-L100" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:from_env` (48:100)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/tls.py#L21-L55" target="_blank" rel="noopener noreferrer">`docker.tls.TLSConfig:__init__` (21:55)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L120-L144" target="_blank" rel="noopener noreferrer">`docker.context.context.Context:_load_certs` (120:144)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/config.py#L75-L81" target="_blank" rel="noopener noreferrer">`docker.context.config:get_context_host` (75:81)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L115-L219" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:__init__` (115:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L355-L374" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_stream_helper` (355:374)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L424-L447" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_read_from_socket` (424:447)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L478-L480" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_check_is_tty` (478:480)</a>
### APIMixins
Provides a structured interface for interacting with various Docker API endpoints. These mixins encapsulate the logic for making API calls related to volumes, plugins, secrets, swarm, services, daemon, build, exec, network, config, containers, and images.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/volume.py#L5-L36" target="_blank" rel="noopener noreferrer">`docker.api.volume.VolumeApiMixin:volumes` (5:36)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/volume.py#L38-L91" target="_blank" rel="noopener noreferrer">`docker.api.volume.VolumeApiMixin:create_volume` (38:91)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/volume.py#L119-L138" target="_blank" rel="noopener noreferrer">`docker.api.volume.VolumeApiMixin:prune_volumes` (119:138)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/volume.py#L140-L163" target="_blank" rel="noopener noreferrer">`docker.api.volume.VolumeApiMixin:remove_volume` (140:163)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L7-L25" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:configure_plugin` (7:25)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L28-L51" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:create_plugin` (28:51)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L54-L69" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:disable_plugin` (54:69)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L72-L88" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:enable_plugin` (72:88)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L91-L103" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:inspect_plugin` (91:103)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L144-L152" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:plugins` (144:152)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L185-L205" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:push_plugin` (185:205)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L209-L225" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:remove_plugin` (209:225)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L229-L261" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin:upgrade_plugin` (229:261)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/secret.py#L8-L43" target="_blank" rel="noopener noreferrer">`docker.api.secret.SecretApiMixin:create_secret` (8:43)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/secret.py#L47-L61" target="_blank" rel="noopener noreferrer">`docker.api.secret.SecretApiMixin:inspect_secret` (47:61)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/secret.py#L65-L81" target="_blank" rel="noopener noreferrer">`docker.api.secret.SecretApiMixin:remove_secret` (65:81)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/secret.py#L84-L98" target="_blank" rel="noopener noreferrer">`docker.api.secret.SecretApiMixin:secrets` (84:98)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L12-L71" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:create_swarm_spec` (12:71)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L74-L81" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:get_unlock_key` (74:81)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L84-L180" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:init_swarm` (84:180)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L183-L195" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:inspect_swarm` (183:195)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L199-L214" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:inspect_node` (199:214)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L217-L265" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:join_swarm` (217:265)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L268-L293" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:leave_swarm` (268:293)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L296-L317" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:nodes` (296:317)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L321-L344" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:remove_node` (321:344)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L347-L380" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:unlock_swarm` (347:380)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L383-L416" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:update_node` (383:416)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L419-L462" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:update_swarm` (419:462)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L5-L96" target="_blank" rel="noopener noreferrer">`docker.api.service._check_api_features` (5:96)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L116-L189" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:create_service` (116:189)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L193-L219" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:inspect_service` (193:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L223-L238" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:inspect_task` (223:238)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L242-L260" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:remove_service` (242:260)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L263-L291" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:services` (263:291)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L344-L365" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:tasks` (344:365)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L369-L486" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:update_service` (369:486)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/daemon.py#L9-L22" target="_blank" rel="noopener noreferrer">`docker.api.daemon.DaemonApiMixin:df` (9:22)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/daemon.py#L24-L81" target="_blank" rel="noopener noreferrer">`docker.api.daemon.DaemonApiMixin:events` (24:81)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/build.py#L12-L275" target="_blank" rel="noopener noreferrer">`docker.api.build.BuildApiMixin:build` (12:275)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/build.py#L278-L319" target="_blank" rel="noopener noreferrer">`docker.api.build.BuildApiMixin:prune_builds` (278:319)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/exec_api.py#L7-L78" target="_blank" rel="noopener noreferrer">`docker.api.exec_api.ExecApiMixin:exec_create` (7:78)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/exec_api.py#L118-L176" target="_blank" rel="noopener noreferrer">`docker.api.exec_api.ExecApiMixin:exec_start` (118:176)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/network.py#L7-L38" target="_blank" rel="noopener noreferrer">`docker.api.network.NetworkApiMixin:networks` (7:38)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/network.py#L40-L152" target="_blank" rel="noopener noreferrer">`docker.api.network.NetworkApiMixin:create_network` (40:152)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/network.py#L155-L174" target="_blank" rel="noopener noreferrer">`docker.api.network.NetworkApiMixin:prune_networks` (155:174)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/network.py#L189-L212" target="_blank" rel="noopener noreferrer">`docker.api.network.NetworkApiMixin:inspect_network` (189:212)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/network.py#L256-L277" target="_blank" rel="noopener noreferrer">`docker.api.network.NetworkApiMixin:disconnect_container_from_network` (256:277)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/config.py#L8-L37" target="_blank" rel="noopener noreferrer">`docker.api.config.ConfigApiMixin:create_config` (8:37)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/config.py#L41-L55" target="_blank" rel="noopener noreferrer">`docker.api.config.ConfigApiMixin:inspect_config` (41:55)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/config.py#L59-L75" target="_blank" rel="noopener noreferrer">`docker.api.config.ConfigApiMixin:remove_config` (59:75)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/config.py#L78-L92" target="_blank" rel="noopener noreferrer">`docker.api.config.ConfigApiMixin:configs` (78:92)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L16-L67" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:attach` (16:67)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L115-L150" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:commit` (115:150)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L152-L219" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:containers` (152:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L221-L440" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:create_container` (221:440)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L442-L443" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:create_container_config` (442:443)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L445-L457" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:create_container_from_config` (445:457)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L459-L617" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:create_host_config` (459:617)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L619-L643" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:create_networking_config` (619:643)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L645-L679" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:create_endpoint_config` (645:679)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L682-L699" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:diff` (682:699)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L702-L722" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:export` (702:722)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L725-L775" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:get_archive` (725:775)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L778-L795" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:inspect_container` (778:795)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L798-L818" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:kill` (798:818)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L821-L901" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:logs` (821:901)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L904-L917" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:pause` (904:917)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L920-L967" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:port` (920:967)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L970-L992" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:put_archive` (970:992)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L995-L1014" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:prune_containers` (995:1014)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1017-L1037" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:remove_container` (1017:1037)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1040-L1055" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:rename` (1040:1055)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1058-L1074" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:resize` (1058:1074)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1077-L1098" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:restart` (1077:1098)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1101-L1136" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:start` (1101:1136)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1139-L1184" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:stats` (1139:1184)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1187-L1212" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:stop` (1187:1212)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1215-L1234" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:top` (1215:1234)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1237-L1246" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:unpause` (1237:1246)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1250-L1312" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:update_container` (1250:1312)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1315-L1348" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:wait` (1315:1348)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L59-L100" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin:images` (59:100)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L291-L324" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin:load_image` (291:324)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L327-L349" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin:prune_images` (327:349)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L351-L434" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin:pull` (351:434)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L436-L500" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin:push` (436:500)</a>
### DockerDataTypes
Defines the Python classes and structures that represent various Docker objects and their configurations, such as container host configurations, network endpoint configurations, swarm specifications, and service definitions. These types are used to construct and validate data sent to the Docker API.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/tls.py#L6-L67" target="_blank" rel="noopener noreferrer">`docker.tls.TLSConfig` (6:67)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L264-L662" target="_blank" rel="noopener noreferrer">`docker.types.containers.HostConfig` (264:662)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L66-L76" target="_blank" rel="noopener noreferrer">`docker.types.containers.LogConfig:__init__` (66:76)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L125-L139" target="_blank" rel="noopener noreferrer">`docker.types.containers.Ulimit:__init__` (125:139)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L187-L221" target="_blank" rel="noopener noreferrer">`docker.types.containers.DeviceRequest:__init__` (187:221)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L265-L662" target="_blank" rel="noopener noreferrer">`docker.types.containers.HostConfig:__init__` (265:662)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L672-L676" target="_blank" rel="noopener noreferrer">`docker.types.containers:host_config_version_error` (672:676)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L682-L685" target="_blank" rel="noopener noreferrer">`docker.types.containers:host_config_incompatible_error` (682:685)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L689-L790" target="_blank" rel="noopener noreferrer">`docker.types.containers.ContainerConfig:__init__` (689:790)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/swarm.py#L11-L94" target="_blank" rel="noopener noreferrer">`docker.types.swarm.SwarmSpec:__init__` (11:94)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/healthcheck.py#L30-L46" target="_blank" rel="noopener noreferrer">`docker.types.healthcheck.Healthcheck:__init__` (30:46)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/daemon.py#L37-L71" target="_blank" rel="noopener noreferrer">`docker.types.daemon.CancellableStream:close` (37:71)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/networks.py#L6-L51" target="_blank" rel="noopener noreferrer">`docker.types.networks.EndpointConfig:__init__` (6:51)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L37-L57" target="_blank" rel="noopener noreferrer">`docker.types.services.TaskTemplate:__init__` (37:57)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L126-L218" target="_blank" rel="noopener noreferrer">`docker.types.services.ContainerSpec:__init__` (126:218)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L249-L306" target="_blank" rel="noopener noreferrer">`docker.types.services.Mount:__init__` (249:306)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L309-L330" target="_blank" rel="noopener noreferrer">`docker.types.services.Mount:parse_mount_string` (309:330)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L350-L369" target="_blank" rel="noopener noreferrer">`docker.types.services.Resources:__init__` (350:369)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L372-L395" target="_blank" rel="noopener noreferrer">`docker.types.services:_convert_generic_resources_dict` (372:395)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L421-L451" target="_blank" rel="noopener noreferrer">`docker.types.services.UpdateConfig:__init__` (421:451)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L555-L559" target="_blank" rel="noopener noreferrer">`docker.types.services.EndpointSpec:__init__` (555:559)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L608-L640" target="_blank" rel="noopener noreferrer">`docker.types.services.ServiceMode:__init__` (608:640)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L679-L688" target="_blank" rel="noopener noreferrer">`docker.types.services.SecretReference:__init__` (679:688)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L707-L716" target="_blank" rel="noopener noreferrer">`docker.types.services.ConfigReference:__init__` (707:716)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L735-L752" target="_blank" rel="noopener noreferrer">`docker.types.services.Placement:__init__` (735:752)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L768-L774" target="_blank" rel="noopener noreferrer">`docker.types.services.PlacementPreference:__init__` (768:774)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L821-L848" target="_blank" rel="noopener noreferrer">`docker.types.services.Privileges:__init__` (821:848)</a>
### UtilityFunctions
A comprehensive collection of helper functions that provide common utilities across the docker-py library. This includes functions for parsing various data formats, comparing Docker API versions, handling file system operations for builds, managing network ports, and applying decorators for common checks.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L10-L500" target="_blank" rel="noopener noreferrer">`docker.utils.utils` (10:500)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/json_stream.py#L35-L40" target="_blank" rel="noopener noreferrer">`docker.utils.json_stream:json_stream` (35:40)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/socket.py#L62-L73" target="_blank" rel="noopener noreferrer">`docker.utils.socket:read_exactly` (62:73)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/socket.py#L76-L89" target="_blank" rel="noopener noreferrer">`docker.utils.socket:next_frame_header` (76:89)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/socket.py#L92-L103" target="_blank" rel="noopener noreferrer">`docker.utils.socket:frames_iter` (92:103)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/socket.py#L106-L124" target="_blank" rel="noopener noreferrer">`docker.utils.socket:frames_iter_no_tty` (106:124)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/socket.py#L127-L137" target="_blank" rel="noopener noreferrer">`docker.utils.socket:frames_iter_tty` (127:137)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/ports.py#L22-L29" target="_blank" rel="noopener noreferrer">`docker.utils.ports:add_port` (22:29)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/ports.py#L32-L37" target="_blank" rel="noopener noreferrer">`docker.utils.ports:build_port_bindings` (32:37)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/ports.py#L56-L83" target="_blank" rel="noopener noreferrer">`docker.utils.ports:split_port` (56:83)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/fnmatch.py#L26-L44" target="_blank" rel="noopener noreferrer">`docker.utils.fnmatch:fnmatch` (26:44)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/fnmatch.py#L47-L60" target="_blank" rel="noopener noreferrer">`docker.utils.fnmatch:fnmatchcase` (47:60)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/decorators.py#L7-L21" target="_blank" rel="noopener noreferrer">`docker.utils.decorators:check_resource` (7:21)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/decorators.py#L24-L34" target="_blank" rel="noopener noreferrer">`docker.utils.decorators:minimum_version` (24:34)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L22-L38" target="_blank" rel="noopener noreferrer">`docker.utils.build:tar` (22:38)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L41-L55" target="_blank" rel="noopener noreferrer">`docker.utils.build:exclude_paths` (41:55)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L70-L120" target="_blank" rel="noopener noreferrer">`docker.utils.build:create_archive` (70:120)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L146-L149" target="_blank" rel="noopener noreferrer">`docker.utils.build:normalize_slashes` (146:149)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L152-L154" target="_blank" rel="noopener noreferrer">`docker.utils.build:walk` (152:154)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L160-L164" target="_blank" rel="noopener noreferrer">`docker.utils.build.PatternMatcher:__init__` (160:164)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L166-L183" target="_blank" rel="noopener noreferrer">`docker.utils.build.PatternMatcher:matches` (166:183)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L185-L219" target="_blank" rel="noopener noreferrer">`docker.utils.build.PatternMatcher:walk` (185:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L223-L230" target="_blank" rel="noopener noreferrer">`docker.utils.build.Pattern:__init__` (223:230)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L233-L257" target="_blank" rel="noopener noreferrer">`docker.utils.build.Pattern:normalize` (233:257)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L259-L260" target="_blank" rel="noopener noreferrer">`docker.utils.build.Pattern:match` (259:260)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/proxy.py#L25-L38" target="_blank" rel="noopener noreferrer">`docker.utils.proxy.ProxyConfig:from_dict` (25:38)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/proxy.py#L56-L69" target="_blank" rel="noopener noreferrer">`docker.utils.proxy.ProxyConfig:inject_proxy_environment` (56:69)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/config.py#L13-L30" target="_blank" rel="noopener noreferrer">`docker.utils.config:find_config_file` (13:30)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/config.py#L51-L66" target="_blank" rel="noopener noreferrer">`docker.utils.config:load_general_config` (51:66)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/json_stream.py#L35-L40" target="_blank" rel="noopener noreferrer">`docker.utils.json_stream:json_stream` (35:40)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/json_stream.py#L50-L74" target="_blank" rel="noopener noreferrer">`docker.utils.json_stream:split_buffer` (50:74)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L28-L32" target="_blank" rel="noopener noreferrer">`docker.utils.utils:create_ipam_pool` (28:32)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L35-L39" target="_blank" rel="noopener noreferrer">`docker.utils.utils:create_ipam_config` (35:39)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L77-L78" target="_blank" rel="noopener noreferrer">`docker.utils.utils:version_lt` (77:78)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L81-L82" target="_blank" rel="noopener noreferrer">`docker.utils.utils:version_gte` (81:82)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L113-L123" target="_blank" rel="noopener noreferrer">`docker.utils.utils:convert_port_bindings` (113:123)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L233-L321" target="_blank" rel="noopener noreferrer">`docker.utils.utils:parse_host` (233:321)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L324-L350" target="_blank" rel="noopener noreferrer">`docker.utils.utils:parse_devices` (324:350)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L353-L388" target="_blank" rel="noopener noreferrer">`docker.utils.utils:kwargs_from_env` (353:388)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L411-L448" target="_blank" rel="noopener noreferrer">`docker.utils.utils:parse_bytes` (411:448)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L458-L483" target="_blank" rel="noopener noreferrer">`docker.utils.utils:parse_env_file` (458:483)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L490-L498" target="_blank" rel="noopener noreferrer">`docker.utils.utils:format_environment` (490:498)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L513-L517" target="_blank" rel="noopener noreferrer">`docker.utils.utils:create_host_config` (513:517)</a>
### ErrorHandling
Defines custom exceptions to manage and propagate specific errors encountered during Docker operations. This component centralizes error types, allowing for more granular error handling and clearer communication of issues within the library.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L120-L128" target="_blank" rel="noopener noreferrer">`docker.errors.TLSParameterError` (120:128)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L100-L101" target="_blank" rel="noopener noreferrer">`docker.errors.InvalidVersion` (100:101)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L112-L113" target="_blank" rel="noopener noreferrer">`docker.errors.InvalidArgument` (112:113)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L13-L19" target="_blank" rel="noopener noreferrer">`docker.errors.DockerException` (13:19)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L131-L132" target="_blank" rel="noopener noreferrer">`docker.errors.NullResource` (131:132)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L116-L117" target="_blank" rel="noopener noreferrer">`docker.errors.DeprecatedMethod` (116:117)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L153-L155" target="_blank" rel="noopener noreferrer">`docker.errors.StreamParseError` (153:155)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L135-L150" target="_blank" rel="noopener noreferrer">`docker.errors.ContainerError` (135:150)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L158-L162" target="_blank" rel="noopener noreferrer">`docker.errors.BuildError` (158:162)</a>
### HighLevelModels
Provides higher-level abstractions and convenience methods for managing Docker resources, building upon the lower-level API Mixins. These models simplify common operations like running containers, building images, and listing networks, offering a more object-oriented interface.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L535-L912" target="_blank" rel="noopener noreferrer">`docker.models.containers.ContainerCollection:run` (535:912)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L1123-L1182" target="_blank" rel="noopener noreferrer">`docker.models.containers:_create_container_args` (1123:1182)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L165-L177" target="_blank" rel="noopener noreferrer">`docker.models.images.RegistryData:pull` (165:177)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L220-L315" target="_blank" rel="noopener noreferrer">`docker.models.images.ImageCollection:build` (220:315)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L415-L475" target="_blank" rel="noopener noreferrer">`docker.models.images.ImageCollection:pull` (415:475)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/networks.py#L185-L214" target="_blank" rel="noopener noreferrer">`docker.models.networks.NetworkCollection:list` (185:214)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

View File

@ -0,0 +1,135 @@
```mermaid
graph LR
DockerClient["DockerClient"]
ContainerManager["ContainerManager"]
ImageManager["ImageManager"]
NetworkManager["NetworkManager"]
VolumeManager["VolumeManager"]
SwarmManager["SwarmManager"]
ServiceManager["ServiceManager"]
PluginManager["PluginManager"]
SecretManager["SecretManager"]
ConfigManager["ConfigManager"]
DockerClient -- "manages" --> ContainerManager
DockerClient -- "manages" --> ImageManager
DockerClient -- "manages" --> NetworkManager
DockerClient -- "manages" --> VolumeManager
DockerClient -- "manages" --> SwarmManager
DockerClient -- "manages" --> ServiceManager
DockerClient -- "manages" --> PluginManager
DockerClient -- "manages" --> SecretManager
DockerClient -- "manages" --> ConfigManager
```
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
## Component Details
This graph illustrates the architecture of the Docker Resource Management subsystem within the `docker-py` library. The `DockerClient` acts as the central entry point, managing various Docker resources through dedicated manager components such as `ContainerManager`, `ImageManager`, `NetworkManager`, `VolumeManager`, `SwarmManager`, `ServiceManager`, `PluginManager`, `SecretManager`, and `ConfigManager`. Each manager component is responsible for the lifecycle and operations of its specific Docker resource type.
### DockerClient
The primary interface for interacting with the Docker daemon. It provides access to various Docker resources (containers, images, networks, volumes, etc.) through dedicated collection objects.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L16-L219" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient` (16:219)</a>
### ContainerManager
Handles operations related to Docker containers, including creation, listing, inspection, starting, stopping, removing, and executing commands within containers. It interacts with the Docker API for container-specific actions.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L14-L1348" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin` (14:1348)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L532-L1029" target="_blank" rel="noopener noreferrer">`docker.models.containers.ContainerCollection` (532:1029)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L20-L529" target="_blank" rel="noopener noreferrer">`docker.models.containers.Container` (20:529)</a>
### ImageManager
Manages Docker images, supporting operations like building, pulling, pushing, listing, inspecting, and removing images. It interacts with the Docker API for image-specific actions and handles image-related data.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L10-L572" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin` (10:572)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L217-L495" target="_blank" rel="noopener noreferrer">`docker.models.images.ImageCollection` (217:495)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L13-L139" target="_blank" rel="noopener noreferrer">`docker.models.images.Image` (13:139)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L142-L214" target="_blank" rel="noopener noreferrer">`docker.models.images.RegistryData` (142:214)</a>
### NetworkManager
Provides functionalities for managing Docker networks, including creating, listing, inspecting, and removing networks, as well as connecting and disconnecting containers from networks.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/network.py#L6-L277" target="_blank" rel="noopener noreferrer">`docker.api.network.NetworkApiMixin` (6:277)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/networks.py#L94-L218" target="_blank" rel="noopener noreferrer">`docker.models.networks.NetworkCollection` (94:218)</a>
### VolumeManager
Manages Docker volumes, enabling operations such as creating, listing, inspecting, and removing volumes.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/volume.py#L4-L163" target="_blank" rel="noopener noreferrer">`docker.api.volume.VolumeApiMixin` (4:163)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/volumes.py#L28-L99" target="_blank" rel="noopener noreferrer">`docker.models.volumes.VolumeCollection` (28:99)</a>
### SwarmManager
Facilitates the management of Docker Swarm, including initializing, joining, leaving, inspecting, and updating swarm nodes and the swarm itself.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L10-L462" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin` (10:462)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/swarm.py#L7-L190" target="_blank" rel="noopener noreferrer">`docker.models.swarm.Swarm` (7:190)</a>
### ServiceManager
Handles Docker Swarm services, allowing for creation, listing, inspection, updating, and removal of services, as well as managing service tasks.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L114-L486" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin` (114:486)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/services.py#L146-L284" target="_blank" rel="noopener noreferrer">`docker.models.services.ServiceCollection` (146:284)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/services.py#L9-L143" target="_blank" rel="noopener noreferrer">`docker.models.services.Service` (9:143)</a>
### PluginManager
Manages Docker plugins, supporting operations like configuring, creating, disabling, enabling, inspecting, pulling, pushing, and removing plugins.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L4-L261" target="_blank" rel="noopener noreferrer">`docker.api.plugin.PluginApiMixin` (4:261)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/plugins.py#L131-L206" target="_blank" rel="noopener noreferrer">`docker.models.plugins.PluginCollection` (131:206)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/plugins.py#L5-L128" target="_blank" rel="noopener noreferrer">`docker.models.plugins.Plugin` (5:128)</a>
### SecretManager
Manages Docker secrets, providing functionalities for creating, inspecting, and removing secrets within a Docker Swarm.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/secret.py#L6-L98" target="_blank" rel="noopener noreferrer">`docker.api.secret.SecretApiMixin` (6:98)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/secrets.py#L27-L70" target="_blank" rel="noopener noreferrer">`docker.models.secrets.SecretCollection` (27:70)</a>
### ConfigManager
Manages Docker configurations (configs), allowing for creation, inspection, and removal of configurations within a Docker Swarm.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/config.py#L6-L92" target="_blank" rel="noopener noreferrer">`docker.api.config.ConfigApiMixin` (6:92)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/configs.py#L27-L70" target="_blank" rel="noopener noreferrer">`docker.models.configs.ConfigCollection` (27:70)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

View File

@ -0,0 +1,288 @@
```mermaid
graph LR
Error_Handling["Error Handling"]
TLS_and_Authentication["TLS and Authentication"]
Utility_Functions["Utility Functions"]
Docker_Context_Management["Docker Context Management"]
Docker_Type_Definitions["Docker Type Definitions"]
Docker_API_Client["Docker API Client"]
Volume_API["Volume API"]
Secret_API["Secret API"]
Swarm_API["Swarm API"]
Service_API["Service API"]
Build_API["Build API"]
Exec_API["Exec API"]
Network_API["Network API"]
Container_API["Container API"]
Image_API["Image API"]
High_Level_Models["High-Level Models"]
TLS_and_Authentication -- "raises" --> Error_Handling
Utility_Functions -- "raises" --> Error_Handling
Docker_Context_Management -- "raises" --> Error_Handling
Docker_Type_Definitions -- "raises" --> Error_Handling
Docker_API_Client -- "raises" --> Error_Handling
Volume_API -- "raises" --> Error_Handling
Secret_API -- "raises" --> Error_Handling
Swarm_API -- "raises" --> Error_Handling
Service_API -- "raises" --> Error_Handling
Build_API -- "raises" --> Error_Handling
Exec_API -- "raises" --> Error_Handling
Network_API -- "raises" --> Error_Handling
Container_API -- "raises" --> Error_Handling
Image_API -- "raises" --> Error_Handling
High_Level_Models -- "raises" --> Error_Handling
Docker_API_Client -- "uses" --> TLS_and_Authentication
Volume_API -- "utilizes" --> Docker_API_Client
Secret_API -- "utilizes" --> Docker_API_Client
Swarm_API -- "utilizes" --> Docker_API_Client
Service_API -- "utilizes" --> Docker_API_Client
Build_API -- "utilizes" --> Docker_API_Client
Exec_API -- "utilizes" --> Docker_API_Client
Network_API -- "utilizes" --> Docker_API_Client
Container_API -- "utilizes" --> Docker_API_Client
Image_API -- "utilizes" --> Docker_API_Client
High_Level_Models -- "utilizes" --> Docker_API_Client
```
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
## Component Details
This graph illustrates the architecture of the Docker SDK for Python, focusing on its core components and their interactions. The system is designed around a central `Docker API Client` that facilitates communication with the Docker daemon. Various API-specific components (e.g., `Volume API`, `Container API`) utilize this client to perform Docker operations. Error handling is centralized in the `Error Handling` component, which is raised by almost all other components to provide structured error reporting. High-level models offer a more user-friendly interface, abstracting away some of the lower-level API calls. Utility functions provide common helper methods, and TLS and authentication components ensure secure communication. Context management allows switching between different Docker environments.
### Error Handling
This component centralizes the definition and creation of various exceptions and errors within the `docker` library. It provides specific error types for different failure scenarios, such as invalid parameters, API errors, and configuration issues, ensuring consistent error reporting across the system.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L13-L19" target="_blank" rel="noopener noreferrer">`docker.errors.DockerException` (13:19)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L22-L39" target="_blank" rel="noopener noreferrer">`docker.errors.create_api_error_from_http_exception` (22:39)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L42-L89" target="_blank" rel="noopener noreferrer">`docker.errors.APIError` (42:89)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L81-L84" target="_blank" rel="noopener noreferrer">`docker.errors.APIError.is_client_error` (81:84)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L86-L89" target="_blank" rel="noopener noreferrer">`docker.errors.APIError.is_server_error` (86:89)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L92-L93" target="_blank" rel="noopener noreferrer">`docker.errors.NotFound` (92:93)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L96-L97" target="_blank" rel="noopener noreferrer">`docker.errors.ImageNotFound` (96:97)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L100-L101" target="_blank" rel="noopener noreferrer">`docker.errors.InvalidVersion` (100:101)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L104-L105" target="_blank" rel="noopener noreferrer">`docker.errors.InvalidRepository` (104:105)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L108-L109" target="_blank" rel="noopener noreferrer">`docker.errors.InvalidConfigFile` (108:109)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L112-L113" target="_blank" rel="noopener noreferrer">`docker.errors.InvalidArgument` (112:113)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L116-L117" target="_blank" rel="noopener noreferrer">`docker.errors.DeprecatedMethod` (116:117)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L120-L128" target="_blank" rel="noopener noreferrer">`docker.errors.TLSParameterError` (120:128)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L131-L132" target="_blank" rel="noopener noreferrer">`docker.errors.NullResource` (131:132)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L135-L150" target="_blank" rel="noopener noreferrer">`docker.errors.ContainerError` (135:150)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L153-L155" target="_blank" rel="noopener noreferrer">`docker.errors.StreamParseError` (153:155)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L158-L162" target="_blank" rel="noopener noreferrer">`docker.errors.BuildError` (158:162)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L165-L166" target="_blank" rel="noopener noreferrer">`docker.errors.ImageLoadError` (165:166)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L169-L177" target="_blank" rel="noopener noreferrer">`docker.errors.create_unexpected_kwargs_error` (169:177)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L180-L185" target="_blank" rel="noopener noreferrer">`docker.errors.MissingContextParameter` (180:185)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L188-L193" target="_blank" rel="noopener noreferrer">`docker.errors.ContextAlreadyExists` (188:193)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L196-L201" target="_blank" rel="noopener noreferrer">`docker.errors.ContextException` (196:201)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L204-L209" target="_blank" rel="noopener noreferrer">`docker.errors.ContextNotFound` (204:209)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/credentials/errors.py#L1-L2" target="_blank" rel="noopener noreferrer">`docker.credentials.errors.StoreError` (1:2)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/credentials/errors.py#L5-L6" target="_blank" rel="noopener noreferrer">`docker.credentials.errors.CredentialsNotFound` (5:6)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/socket.py#L17-L18" target="_blank" rel="noopener noreferrer">`docker.utils.socket.SocketError` (17:18)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L665-L669" target="_blank" rel="noopener noreferrer">`docker.types.containers.host_config_type_error` (665:669)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L678-L679" target="_blank" rel="noopener noreferrer">`docker.types.containers.host_config_value_error` (678:679)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L672-L676" target="_blank" rel="noopener noreferrer">`docker.types.containers.host_config_version_error` (672:676)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L682-L685" target="_blank" rel="noopener noreferrer">`docker.types.containers.host_config_incompatible_error` (682:685)</a>
### TLS and Authentication
This component manages secure communication configurations, including TLS parameters and user authentication details. It handles the parsing of authentication configurations and resolves repository authentication, ensuring secure access to Docker registries and daemons.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/tls.py#L21-L55" target="_blank" rel="noopener noreferrer">`docker.tls.TLSConfig:__init__` (21:55)</a>
- `docker.auth:resolve_` (full file reference)
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L84-L141" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig:parse_auth` (84:141)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L244-L270" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig:_resolve_authconfig_credstore` (244:270)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L352-L378" target="_blank" rel="noopener noreferrer">`docker.auth:_load_legacy_config` (352:378)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/credentials/store.py#L71-L93" target="_blank" rel="noopener noreferrer">`docker.credentials.store.Store:_execute` (71:93)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/credentials/errors.py#L13-L17" target="_blank" rel="noopener noreferrer">`docker.credentials.errors:process_store_error` (13:17)</a>
### Utility Functions
This component provides a collection of helper functions for common tasks such as socket operations, resource validation, version checking, JSON stream parsing, and various data parsing utilities. It aims to encapsulate reusable logic and simplify interactions with Docker-related data.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/socket.py#L62-L73" target="_blank" rel="noopener noreferrer">`docker.utils.socket:read_exactly` (62:73)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/decorators.py#L7-L21" target="_blank" rel="noopener noreferrer">`docker.utils.decorators:check_resource` (7:21)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/decorators.py#L24-L34" target="_blank" rel="noopener noreferrer">`docker.utils.decorators:minimum_version` (24:34)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/json_stream.py#L50-L74" target="_blank" rel="noopener noreferrer">`docker.utils.json_stream:split_buffer` (50:74)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L28-L32" target="_blank" rel="noopener noreferrer">`docker.utils.utils:create_ipam_pool` (28:32)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L35-L39" target="_blank" rel="noopener noreferrer">`docker.utils.utils:create_ipam_config` (35:39)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L233-L321" target="_blank" rel="noopener noreferrer">`docker.utils.utils:parse_host` (233:321)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L324-L350" target="_blank" rel="noopener noreferrer">`docker.utils.utils:parse_devices` (324:350)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L411-L448" target="_blank" rel="noopener noreferrer">`docker.utils.utils:parse_bytes` (411:448)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L458-L483" target="_blank" rel="noopener noreferrer">`docker.utils.utils:parse_env_file` (458:483)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L513-L517" target="_blank" rel="noopener noreferrer">`docker.utils.utils:create_host_config` (513:517)</a>
### Docker Context Management
This component is responsible for managing Docker contexts, which define connection parameters to Docker daemons. It provides functionalities to create, set, remove, and inspect contexts, allowing users to easily switch between different Docker environments.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L19-L60" target="_blank" rel="noopener noreferrer">`docker.context.context.Context:__init__` (19:60)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L23-L70" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI:create_context` (23:70)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L136-L144" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI:set_current_context` (136:144)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L147-L177" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI:remove_context` (147:177)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L180-L206" target="_blank" rel="noopener noreferrer">`docker.context.api.ContextAPI:inspect_context` (180:206)</a>
### Docker Type Definitions
This component defines various data structures and classes that represent Docker objects and configurations, such as host configurations, container configurations, swarm specifications, network endpoint configurations, and service-related types like mounts and update policies. It ensures proper data validation and structure for interacting with the Docker API.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L265-L662" target="_blank" rel="noopener noreferrer">`docker.types.containers.HostConfig:__init__` (265:662)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L672-L676" target="_blank" rel="noopener noreferrer">`docker.types.containers:host_config_version_error` (672:676)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L682-L685" target="_blank" rel="noopener noreferrer">`docker.types.containers:host_config_incompatible_error` (682:685)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L689-L790" target="_blank" rel="noopener noreferrer">`docker.types.containers.ContainerConfig:__init__` (689:790)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/swarm.py#L11-L94" target="_blank" rel="noopener noreferrer">`docker.types.swarm.SwarmSpec:__init__` (11:94)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/daemon.py#L37-L71" target="_blank" rel="noopener noreferrer">`docker.types.daemon.CancellableStream:close` (37:71)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/networks.py#L6-L51" target="_blank" rel="noopener noreferrer">`docker.types.networks.EndpointConfig:__init__` (6:51)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L249-L306" target="_blank" rel="noopener noreferrer">`docker.types.services.Mount:__init__` (249:306)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L309-L330" target="_blank" rel="noopener noreferrer">`docker.types.services.Mount:parse_mount_string` (309:330)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L372-L395" target="_blank" rel="noopener noreferrer">`docker.types.services:_convert_generic_resources_dict` (372:395)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L421-L451" target="_blank" rel="noopener noreferrer">`docker.types.services.UpdateConfig:__init__` (421:451)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L608-L640" target="_blank" rel="noopener noreferrer">`docker.types.services.ServiceMode:__init__` (608:640)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L768-L774" target="_blank" rel="noopener noreferrer">`docker.types.services.PlacementPreference:__init__` (768:774)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/services.py#L821-L848" target="_blank" rel="noopener noreferrer">`docker.types.services.Privileges:__init__` (821:848)</a>
### Docker API Client
This core component provides the low-level interface for interacting with the Docker daemon's API. It handles the establishment of connections, sending requests, and processing responses, including error handling and version compatibility checks. It serves as the foundation for all higher-level Docker operations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L115-L219" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:__init__` (115:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L221-L232" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_retrieve_server_version` (221:232)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L272-L277" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_raise_for_status` (272:277)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L321-L331" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_create_websocket_connection` (321:331)</a>
### Volume API
This component provides methods for managing Docker volumes, including creating and removing them. It interacts with the Docker API Client to perform volume-related operations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/volume.py#L38-L91" target="_blank" rel="noopener noreferrer">`docker.api.volume.VolumeApiMixin:create_volume` (38:91)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/volume.py#L140-L163" target="_blank" rel="noopener noreferrer">`docker.api.volume.VolumeApiMixin:remove_volume` (140:163)</a>
### Secret API
This component provides methods for managing Docker secrets, including creating them. It interacts with the Docker API Client to perform secret-related operations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/secret.py#L8-L43" target="_blank" rel="noopener noreferrer">`docker.api.secret.SecretApiMixin:create_secret` (8:43)</a>
### Swarm API
This component provides methods for managing Docker Swarm, including initializing, joining, unlocking, and updating swarm configurations. It interacts with the Docker API Client to perform swarm-related operations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L84-L180" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:init_swarm` (84:180)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L217-L265" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:join_swarm` (217:265)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L347-L380" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:unlock_swarm` (347:380)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L419-L462" target="_blank" rel="noopener noreferrer">`docker.api.swarm.SwarmApiMixin:update_swarm` (419:462)</a>
### Service API
This component provides methods for managing Docker services, including creating, inspecting, and listing them. It interacts with the Docker API Client and performs API feature checks.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L5-L96" target="_blank" rel="noopener noreferrer">`docker.api.service:_check_api_features` (5:96)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L116-L189" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:create_service` (116:189)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L193-L219" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:inspect_service` (193:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L263-L291" target="_blank" rel="noopener noreferrer">`docker.api.service.ServiceApiMixin:services` (263:291)</a>
### Build API
This component provides methods for building Docker images and pruning build cache. It interacts with the Docker API Client to perform image build operations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/build.py#L12-L275" target="_blank" rel="noopener noreferrer">`docker.api.build.BuildApiMixin:build` (12:275)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/build.py#L278-L319" target="_blank" rel="noopener noreferrer">`docker.api.build.BuildApiMixin:prune_builds` (278:319)</a>
### Exec API
This component provides methods for executing commands inside running Docker containers. It interacts with the Docker API Client to perform exec operations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/exec_api.py#L7-L78" target="_blank" rel="noopener noreferrer">`docker.api.exec_api.ExecApiMixin:exec_create` (7:78)</a>
### Network API
This component provides methods for managing Docker networks, including creating, inspecting, and disconnecting containers from networks. It interacts with the Docker API Client to perform network-related operations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/network.py#L40-L152" target="_blank" rel="noopener noreferrer">`docker.api.network.NetworkApiMixin:create_network` (40:152)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/network.py#L189-L212" target="_blank" rel="noopener noreferrer">`docker.api.network.NetworkApiMixin:inspect_network` (189:212)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/network.py#L256-L277" target="_blank" rel="noopener noreferrer">`docker.api.network.NetworkApiMixin:disconnect_container_from_network` (256:277)</a>
### Container API
This component provides methods for managing Docker containers, including creating, logging, starting, getting stats, updating, and waiting for containers. It interacts with the Docker API Client to perform container-related operations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L445-L457" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:create_container_from_config` (445:457)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L821-L901" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:logs` (821:901)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1101-L1136" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:start` (1101:1136)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1139-L1184" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:stats` (1139:1184)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1250-L1312" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:update_container` (1250:1312)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L1315-L1348" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin:wait` (1315:1348)</a>
### Image API
This component provides methods for managing Docker images, including importing, loading, and pulling images. It interacts with the Docker API Client to perform image-related operations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L102-L152" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin:import_image` (102:152)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L291-L324" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin:load_image` (291:324)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L351-L434" target="_blank" rel="noopener noreferrer">`docker.api.image.ImageApiMixin:pull` (351:434)</a>
### High-Level Models
This component provides higher-level abstractions for Docker objects like containers, images, and services, simplifying common operations. These models often wrap the lower-level API client calls and provide more user-friendly interfaces.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L47-L58" target="_blank" rel="noopener noreferrer">`docker.models.containers.Container:labels` (47:58)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L535-L912" target="_blank" rel="noopener noreferrer">`docker.models.containers.ContainerCollection:run` (535:912)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L1123-L1182" target="_blank" rel="noopener noreferrer">`docker.models.containers:_create_container_args` (1123:1182)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L80-L120" target="_blank" rel="noopener noreferrer">`docker.models.images.Image:save` (80:120)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L179-L209" target="_blank" rel="noopener noreferrer">`docker.models.images.RegistryData:has_platform` (179:209)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L220-L315" target="_blank" rel="noopener noreferrer">`docker.models.images.ImageCollection:build` (220:315)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L383-L413" target="_blank" rel="noopener noreferrer">`docker.models.images.ImageCollection:load` (383:413)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/services.py#L116-L133" target="_blank" rel="noopener noreferrer">`docker.models.services.Service:scale` (116:133)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/services.py#L342-L390" target="_blank" rel="noopener noreferrer">`docker.models.services:_get_create_service_kwargs` (342:390)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

View File

@ -0,0 +1,88 @@
```mermaid
graph LR
High_Level_Client["High-Level Client"]
Low_Level_API_Client["Low-Level API Client"]
Resource_Collections["Resource Collections"]
Client_Configuration_Utilities["Client Configuration Utilities"]
High_Level_Client -- "initializes and configures" --> Low_Level_API_Client
High_Level_Client -- "manages resources through" --> Resource_Collections
High_Level_Client -- "configures via" --> Client_Configuration_Utilities
Low_Level_API_Client -- "uses" --> Client_Configuration_Utilities
Resource_Collections -- "uses" --> Low_Level_API_Client
```
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
## Component Details
This graph illustrates the core components of the `docker-py` library's client subsystem. The `High-Level Client` provides an intuitive object-oriented interface, acting as the primary entry point for user interactions. It delegates complex operations to the `Low-Level API Client` for direct communication with the Docker daemon and manages various Docker entities through `Resource Collections`. Client configuration, including environment variable parsing, authentication, and proxy settings, is handled by `Client Configuration Utilities`.
### High-Level Client
Provides a user-friendly, object-oriented interface for interacting with the Docker daemon, abstracting the underlying API. It serves as the primary entry point for most user operations, delegating to the Low-Level API Client and managing resources via Resource Collections.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L16-L219" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient` (16:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L44-L45" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:__init__` (44:45)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L48-L100" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:from_env` (48:100)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L104-L109" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:configs` (104:109)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L112-L117" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:containers` (112:117)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L120-L125" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:images` (120:125)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L128-L133" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:networks` (128:133)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L136-L141" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:nodes` (136:141)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L144-L149" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:plugins` (144:149)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L152-L157" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:secrets` (152:157)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L160-L165" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:services` (160:165)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L168-L173" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:swarm` (168:173)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L176-L181" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:volumes` (176:181)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L184-L185" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:events` (184:185)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L188-L189" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:df` (188:189)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L192-L193" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:info` (192:193)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L196-L197" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:login` (196:197)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L200-L201" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:ping` (200:201)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L204-L205" target="_blank" rel="noopener noreferrer">`docker.client.DockerClient:version` (204:205)</a>
### Low-Level API Client
The low-level API client responsible for direct communication with the Docker daemon. It handles the actual HTTP requests and responses, providing the core functionality that the High-Level Client builds upon by aggregating various API mixins.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L57-L532" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient` (57:532)</a>
### Resource Collections
A set of classes, each responsible for managing a specific type of Docker resource (e.g., configs, containers, images, networks, nodes, plugins, secrets, services, volumes). These classes provide methods for creating, listing, inspecting, and removing their respective resources, typically inheriting from a common Collection base class.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/resource.py#L51-L92" target="_blank" rel="noopener noreferrer">`docker.models.resource.Collection` (51:92)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/resource.py#L1-L48" target="_blank" rel="noopener noreferrer">`docker.models.resource.Model` (1:48)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/configs.py#L27-L70" target="_blank" rel="noopener noreferrer">`docker.models.configs.ConfigCollection` (27:70)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L532-L1029" target="_blank" rel="noopener noreferrer">`docker.models.containers.ContainerCollection` (532:1029)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L217-L495" target="_blank" rel="noopener noreferrer">`docker.models.images.ImageCollection` (217:495)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/networks.py#L94-L218" target="_blank" rel="noopener noreferrer">`docker.models.networks.NetworkCollection` (94:218)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/nodes.py#L64-L107" target="_blank" rel="noopener noreferrer">`docker.models.nodes.NodeCollection` (64:107)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/plugins.py#L131-L206" target="_blank" rel="noopener noreferrer">`docker.models.plugins.PluginCollection` (131:206)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/secrets.py#L27-L70" target="_blank" rel="noopener noreferrer">`docker.models.secrets.SecretCollection` (27:70)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/services.py#L146-L284" target="_blank" rel="noopener noreferrer">`docker.models.services.ServiceCollection` (146:284)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/swarm.py#L7-L190" target="_blank" rel="noopener noreferrer">`docker.models.swarm.Swarm` (7:190)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/volumes.py#L28-L99" target="_blank" rel="noopener noreferrer">`docker.models.volumes.VolumeCollection` (28:99)</a>
### Client Configuration Utilities
Contains helper functions and utilities primarily used for configuring the Docker client, such as parsing environment variables, handling authentication, and proxy settings.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L353-L388" target="_blank" rel="noopener noreferrer">`docker.utils.utils.kwargs_from_env` (353:388)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L75-L306" target="_blank" rel="noopener noreferrer">`docker.auth.AuthConfig` (75:306)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/proxy.py#L4-L77" target="_blank" rel="noopener noreferrer">`docker.utils.proxy.ProxyConfig` (4:77)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

View File

@ -0,0 +1,116 @@
```mermaid
graph LR
API_Client_Core["API Client Core"]
Error_Handling["Error Handling"]
Configuration_Utilities["Configuration & Utilities"]
Transport_Adapters["Transport Adapters"]
Authentication["Authentication"]
API_Mixins["API Mixins"]
API_Client_Core -- "initializes with and uses" --> Configuration_Utilities
API_Client_Core -- "uses" --> Transport_Adapters
API_Client_Core -- "uses" --> Authentication
API_Client_Core -- "raises and handles" --> Error_Handling
API_Client_Core -- "invokes methods from" --> API_Mixins
```
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
## Component Details
The Low-Level API Client subsystem in docker-py provides the core functionality for direct HTTP communication with the Docker daemon. It manages the entire lifecycle of requests, from connection establishment and dispatching (GET, POST, PUT, DELETE) to response processing and error handling. The system also integrates various API mixins to extend its capabilities for specific Docker resources like containers, images, and networks. Configuration loading, authentication, and different transport mechanisms (Unix sockets, named pipes, SSH) are also handled within this subsystem to ensure robust and flexible communication with the Docker daemon.
### API Client Core
The central component for interacting with the Docker daemon. It handles connection establishment, request dispatching (GET, POST, PUT, DELETE), response processing, and streaming. It also manages server version compatibility and configuration reloading.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L57-L532" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient` (57:532)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L115-L219" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:__init__` (115:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L221-L232" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_retrieve_server_version` (221:232)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L241-L242" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_post` (241:242)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L245-L246" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_get` (245:246)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L249-L250" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_put` (249:250)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L253-L254" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_delete` (253:254)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L272-L277" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_raise_for_status` (272:277)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L279-L287" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_result` (279:287)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L289-L303" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_post_json` (289:303)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L313-L319" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_attach_websocket` (313:319)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L321-L331" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_create_websocket_connection` (321:331)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L333-L353" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_get_raw_response_socket` (333:353)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L355-L374" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_stream_helper` (355:374)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L376-L390" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_multiplexed_buffer_helper` (376:390)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L392-L411" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_multiplexed_response_stream_helper` (392:411)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L413-L422" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_stream_raw_result` (413:422)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L424-L447" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_read_from_socket` (424:447)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L478-L480" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_check_is_tty` (478:480)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L482-L483" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_get_result` (482:483)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L485-L499" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:_get_result_tty` (485:499)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L518-L532" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient:reload_config` (518:532)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L234-L238" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient._set_request_timeout` (234:238)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L501-L503" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient._unmount` (501:503)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L256-L270" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient._url` (256:270)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L305-L310" target="_blank" rel="noopener noreferrer">`docker.api.client.APIClient._attach_params` (305:310)</a>
### Error Handling
This component is responsible for defining and raising specific exceptions related to Docker operations and for converting HTTP errors into more meaningful Docker exceptions.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L120-L128" target="_blank" rel="noopener noreferrer">`docker.errors.TLSParameterError` (120:128)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L13-L19" target="_blank" rel="noopener noreferrer">`docker.errors.DockerException` (13:19)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L100-L101" target="_blank" rel="noopener noreferrer">`docker.errors.InvalidVersion` (100:101)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L22-L39" target="_blank" rel="noopener noreferrer">`docker.errors.create_api_error_from_http_exception` (22:39)</a>
### Configuration & Utilities
Provides various utility functions for loading configurations (general, proxy, authentication), parsing host information, handling JSON streams, managing sockets, and applying decorators for resource checks.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/config.py#L51-L66" target="_blank" rel="noopener noreferrer">`docker.utils.config.load_general_config` (51:66)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/proxy.py#L25-L38" target="_blank" rel="noopener noreferrer">`docker.utils.proxy.ProxyConfig.from_dict` (25:38)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L233-L321" target="_blank" rel="noopener noreferrer">`docker.utils.utils.parse_host` (233:321)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L77-L78" target="_blank" rel="noopener noreferrer">`docker.utils.utils.version_lt` (77:78)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/json_stream.py#L35-L40" target="_blank" rel="noopener noreferrer">`docker.utils.json_stream.json_stream` (35:40)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/socket.py#L92-L103" target="_blank" rel="noopener noreferrer">`docker.utils.socket.frames_iter` (92:103)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/socket.py#L177-L187" target="_blank" rel="noopener noreferrer">`docker.utils.socket.demux_adaptor` (177:187)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/socket.py#L140-L174" target="_blank" rel="noopener noreferrer">`docker.utils.socket.consume_socket_output` (140:174)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/decorators.py#L7-L21" target="_blank" rel="noopener noreferrer">`docker.utils.decorators.check_resource` (7:21)</a>
### Transport Adapters
Handles the low-level communication with the Docker daemon over different transport mechanisms, such as Unix sockets, named pipes (Npipe), and SSH.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py#L45-L86" target="_blank" rel="noopener noreferrer">`docker.transport.unixconn.UnixHTTPAdapter` (45:86)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipeconn.py#L64-L102" target="_blank" rel="noopener noreferrer">`docker.transport.npipeconn.NpipeHTTPAdapter` (64:102)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L159-L250" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHHTTPAdapter` (159:250)</a>
### Authentication
Manages the loading and handling of Docker authentication configurations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L348-L349" target="_blank" rel="noopener noreferrer">`docker.auth.load_config` (348:349)</a>
### API Mixins
Provides specific API functionalities related to the Docker daemon and containers, which are then integrated into the main API client.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/daemon.py#L168-L181" target="_blank" rel="noopener noreferrer">`docker.api.daemon.DaemonApiMixin.version` (168:181)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L778-L795" target="_blank" rel="noopener noreferrer">`docker.api.container.ContainerApiMixin.inspect_container` (778:795)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

View File

@ -0,0 +1,133 @@
```mermaid
graph LR
NpipeSocket["NpipeSocket"]
NpipeHTTPConnectionPool["NpipeHTTPConnectionPool"]
NpipeHTTPAdapter["NpipeHTTPAdapter"]
UnixHTTPConnectionPool["UnixHTTPConnectionPool"]
UnixHTTPAdapter["UnixHTTPAdapter"]
SSHSocket["SSHSocket"]
SSHConnectionPool["SSHConnectionPool"]
SSHHTTPAdapter["SSHHTTPAdapter"]
BaseHTTPAdapter["BaseHTTPAdapter"]
NpipeHTTPConnectionPool -- "utilizes" --> NpipeSocket
NpipeHTTPAdapter -- "creates" --> NpipeHTTPConnectionPool
UnixHTTPAdapter -- "creates" --> UnixHTTPConnectionPool
SSHConnectionPool -- "utilizes" --> SSHSocket
SSHHTTPAdapter -- "creates" --> SSHConnectionPool
NpipeHTTPAdapter -- "inherits from" --> BaseHTTPAdapter
UnixHTTPAdapter -- "inherits from" --> BaseHTTPAdapter
SSHHTTPAdapter -- "inherits from" --> BaseHTTPAdapter
```
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
## Component Details
This overview details the Transport Layer subsystem of docker-py, which is responsible for handling low-level communication protocols to connect to the Docker daemon. It supports Npipe, Unix sockets, and SSH, managing HTTP connection pooling and socket operations across these different transport mechanisms.
### NpipeSocket
This component provides a partial implementation of the socket API over Windows named pipes. It is designed to be used as a client socket, handling connections, sending, and receiving data over named pipes. It manages the underlying Windows pipe handle and provides methods for basic socket operations like connect, send, recv, and close.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L29-L203" target="_blank" rel="noopener noreferrer">`docker.transport.npipesocket.NpipeSocket` (29:203)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L52-L81" target="_blank" rel="noopener noreferrer">`docker.transport.npipesocket.NpipeSocket:connect` (52:81)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L84-L85" target="_blank" rel="noopener noreferrer">`docker.transport.npipesocket.NpipeSocket:connect_ex` (84:85)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L93-L94" target="_blank" rel="noopener noreferrer">`docker.transport.npipesocket.NpipeSocket:dup` (93:94)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L111-L117" target="_blank" rel="noopener noreferrer">`docker.transport.npipesocket.NpipeSocket:makefile` (111:117)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L125-L127" target="_blank" rel="noopener noreferrer">`docker.transport.npipesocket.NpipeSocket:recvfrom` (125:127)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L130-L131" target="_blank" rel="noopener noreferrer">`docker.transport.npipesocket.NpipeSocket:recvfrom_into` (130:131)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L172-L173" target="_blank" rel="noopener noreferrer">`docker.transport.npipesocket.NpipeSocket:sendall` (172:173)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L176-L178" target="_blank" rel="noopener noreferrer">`docker.transport.npipesocket.NpipeSocket:sendto` (176:178)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L180-L183" target="_blank" rel="noopener noreferrer">`docker.transport.npipesocket.NpipeSocket:setblocking` (180:183)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L202-L203" target="_blank" rel="noopener noreferrer">`docker.transport.npipesocket.NpipeSocket:shutdown` (202:203)</a>
### NpipeHTTPConnectionPool
This component manages a pool of NpipeHTTPConnection instances. It's responsible for creating new connections when needed and reusing existing ones to optimize performance and resource utilization when communicating with a named pipe endpoint. It overrides urllib3's default connection pooling behavior to specifically handle named pipe connections.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipeconn.py#L29-L61" target="_blank" rel="noopener noreferrer">`docker.transport.npipeconn.NpipeHTTPConnectionPool` (29:61)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipeconn.py#L37-L40" target="_blank" rel="noopener noreferrer">`docker.transport.npipeconn.NpipeHTTPConnectionPool:_new_conn` (37:40)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipeconn.py#L45-L61" target="_blank" rel="noopener noreferrer">`docker.transport.npipeconn.NpipeHTTPConnectionPool:_get_conn` (45:61)</a>
### NpipeHTTPAdapter
This component is a Requests adapter that integrates named pipe communication into the Requests library. It provides a mechanism to obtain connections from the NpipeHTTPConnectionPool and handles the URL scheme for named pipes (npipe://) to route requests appropriately.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipeconn.py#L64-L102" target="_blank" rel="noopener noreferrer">`docker.transport.npipeconn.NpipeHTTPAdapter` (64:102)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipeconn.py#L82-L94" target="_blank" rel="noopener noreferrer">`docker.transport.npipeconn.NpipeHTTPAdapter:get_connection` (82:94)</a>
### UnixHTTPConnectionPool
This component is responsible for managing a pool of HTTP connections over Unix sockets. It creates and reuses UnixHTTPConnection instances for efficient communication with services exposed via Unix domain sockets.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py#L30-L42" target="_blank" rel="noopener noreferrer">`docker.transport.unixconn.UnixHTTPConnectionPool` (30:42)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py#L39-L42" target="_blank" rel="noopener noreferrer">`docker.transport.unixconn.UnixHTTPConnectionPool:_new_conn` (39:42)</a>
### UnixHTTPAdapter
This component is a Requests adapter that integrates Unix socket communication into the Requests library. It obtains connections from the UnixHTTPConnectionPool and handles the URL scheme for Unix sockets.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py#L45-L86" target="_blank" rel="noopener noreferrer">`docker.transport.unixconn.UnixHTTPAdapter` (45:86)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py#L66-L78" target="_blank" rel="noopener noreferrer">`docker.transport.unixconn.UnixHTTPAdapter:get_connection` (66:78)</a>
### SSHSocket
This component provides a socket-like interface for SSH connections. It handles sending and receiving data over an SSH channel, abstracting the underlying SSH protocol details.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L20-L95" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHSocket` (20:95)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L71-L72" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHSocket:sendall` (71:72)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L74-L75" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHSocket:send` (74:75)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L83-L88" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHSocket:makefile` (83:88)</a>
### SSHConnectionPool
This component manages a pool of SSHConnection instances. It's responsible for creating new SSH connections and reusing existing ones to optimize performance when communicating over SSH.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L120-L156" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHConnectionPool` (120:156)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L133-L134" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHConnectionPool:_new_conn` (133:134)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L139-L156" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHConnectionPool:_get_conn` (139:156)</a>
### SSHHTTPAdapter
This component is a Requests adapter that integrates SSH communication into the Requests library. It handles the initialization of Paramiko client, establishes SSH connections, and obtains connections from the SSHConnectionPool to route HTTP requests over SSH.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L159-L250" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHHTTPAdapter` (159:250)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L165-L183" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHHTTPAdapter:__init__` (165:183)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L220-L245" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHHTTPAdapter:get_connection` (220:245)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L247-L250" target="_blank" rel="noopener noreferrer">`docker.transport.sshconn.SSHHTTPAdapter:close` (247:250)</a>
### BaseHTTPAdapter
This is a base class for HTTP adapters in the Requests library, providing common functionality for handling HTTP connections and requests. It serves as an abstraction layer for different transport mechanisms.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/basehttpadapter.py#L4-L13" target="_blank" rel="noopener noreferrer">`docker.transport.basehttpadapter.BaseHTTPAdapter` (4:13)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)

View File

@ -0,0 +1,171 @@
```mermaid
graph LR
High_Level_Client["High-Level Client"]
Low_Level_API_Client["Low-Level API Client"]
Docker_Resource_Management["Docker Resource Management"]
Daemon_Exec_Operations["Daemon & Exec Operations"]
Build_System["Build System"]
Authentication_Configuration["Authentication & Configuration"]
Transport_Layer["Transport Layer"]
Error_Handling["Error Handling"]
Data_Models_Utilities["Data Models & Utilities"]
High_Level_Client -- "uses" --> Low_Level_API_Client
High_Level_Client -- "manages" --> Docker_Resource_Management
High_Level_Client -- "accesses" --> Daemon_Exec_Operations
Low_Level_API_Client -- "uses for communication" --> Transport_Layer
Low_Level_API_Client -- "uses for authentication/config" --> Authentication_Configuration
Low_Level_API_Client -- "raises" --> Error_Handling
Low_Level_API_Client -- "uses" --> Data_Models_Utilities
Docker_Resource_Management -- "makes API calls to" --> Low_Level_API_Client
Docker_Resource_Management -- "uses" --> Data_Models_Utilities
Docker_Resource_Management -- "raises" --> Error_Handling
Docker_Resource_Management -- "uses for pull/push" --> Authentication_Configuration
Daemon_Exec_Operations -- "makes API calls to" --> Low_Level_API_Client
Daemon_Exec_Operations -- "uses" --> Data_Models_Utilities
Daemon_Exec_Operations -- "raises" --> Error_Handling
Daemon_Exec_Operations -- "uses for login" --> Authentication_Configuration
Build_System -- "makes API calls to" --> Low_Level_API_Client
Build_System -- "raises" --> Error_Handling
Build_System -- "uses" --> Data_Models_Utilities
Build_System -- "uses for auth headers" --> Authentication_Configuration
Authentication_Configuration -- "uses config from" --> Data_Models_Utilities
Authentication_Configuration -- "raises" --> Error_Handling
Transport_Layer -- "raises" --> Error_Handling
Data_Models_Utilities -- "raises" --> Error_Handling
click High_Level_Client href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/docker-py/High-Level Client.md" "Details"
click Low_Level_API_Client href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/docker-py/Low-Level API Client.md" "Details"
click Docker_Resource_Management href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/docker-py/Docker Resource Management.md" "Details"
click Daemon_Exec_Operations href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/docker-py/Daemon & Exec Operations.md" "Details"
click Build_System href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/docker-py/Build System.md" "Details"
click Authentication_Configuration href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/docker-py/Authentication & Configuration.md" "Details"
click Transport_Layer href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/docker-py/Transport Layer.md" "Details"
click Error_Handling href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/docker-py/Error Handling.md" "Details"
click Data_Models_Utilities href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/docker-py/Data Models & Utilities.md" "Details"
```
[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org)
## Component Details
The `docker-py` library provides a comprehensive Python interface for interacting with the Docker daemon. It is structured into a high-level client for ease of use and a low-level API client for direct communication. The system manages various Docker resources like containers, images, networks, and volumes, and handles advanced features such as Swarm, services, plugins, secrets, and configurations. It includes robust mechanisms for authentication, credential management, Docker context handling, and image building. Underlying these functionalities are a flexible transport layer supporting different communication protocols and a dedicated error handling system, all supported by a rich set of data models and utility functions.
### High-Level Client
Provides a user-friendly, object-oriented interface for interacting with the Docker daemon, abstracting the underlying API. It serves as the primary entry point for most user operations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L16-L219" target="_blank" rel="noopener noreferrer">`docker-py.docker.client.DockerClient` (16:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L44-L45" target="_blank" rel="noopener noreferrer">`docker-py.docker.client.DockerClient:__init__` (44:45)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/client.py#L48-L100" target="_blank" rel="noopener noreferrer">`docker-py.docker.client.DockerClient:from_env` (48:100)</a>
### Low-Level API Client
Handles direct HTTP communication with the Docker daemon, managing requests, responses, and error handling. It serves as the core communication layer and integrates various API mixins.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L57-L532" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.client.APIClient` (57:532)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L115-L219" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.client.APIClient:__init__` (115:219)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/client.py#L241-L242" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.client.APIClient:_post` (241:242)</a>
### Docker Resource Management
Encompasses the API mixins and object models for managing the lifecycle and operations of various Docker resources like containers, images, networks, volumes, swarm, services, plugins, secrets, and configurations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/container.py#L14-L1348" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.container.ContainerApiMixin` (14:1348)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/containers.py#L532-L1029" target="_blank" rel="noopener noreferrer">`docker-py.docker.models.containers.ContainerCollection` (532:1029)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/image.py#L10-L572" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.image.ImageApiMixin` (10:572)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/images.py#L217-L495" target="_blank" rel="noopener noreferrer">`docker-py.docker.models.images.ImageCollection` (217:495)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/network.py#L6-L277" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.network.NetworkApiMixin` (6:277)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/networks.py#L94-L218" target="_blank" rel="noopener noreferrer">`docker-py.docker.models.networks.NetworkCollection` (94:218)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/volume.py#L4-L163" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.volume.VolumeApiMixin` (4:163)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/volumes.py#L28-L99" target="_blank" rel="noopener noreferrer">`docker-py.docker.models.volumes.VolumeCollection` (28:99)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/swarm.py#L10-L462" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.swarm.SwarmApiMixin` (10:462)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/swarm.py#L7-L190" target="_blank" rel="noopener noreferrer">`docker-py.docker.models.swarm.Swarm` (7:190)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/service.py#L114-L486" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.service.ServiceApiMixin` (114:486)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/services.py#L146-L284" target="_blank" rel="noopener noreferrer">`docker-py.docker.models.services.ServiceCollection` (146:284)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/plugin.py#L4-L261" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.plugin.PluginApiMixin` (4:261)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/plugins.py#L131-L206" target="_blank" rel="noopener noreferrer">`docker-py.docker.models.plugins.PluginCollection` (131:206)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/secret.py#L6-L98" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.secret.SecretApiMixin` (6:98)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/secrets.py#L27-L70" target="_blank" rel="noopener noreferrer">`docker-py.docker.models.secrets.SecretCollection` (27:70)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/config.py#L6-L92" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.config.ConfigApiMixin` (6:92)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/models/configs.py#L27-L70" target="_blank" rel="noopener noreferrer">`docker-py.docker.models.configs.ConfigCollection` (27:70)</a>
### Daemon & Exec Operations
Provides functionalities for general Docker daemon operations (e.g., info, events, login) and executing commands within running containers.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/daemon.py#L7-L181" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.daemon.DaemonApiMixin` (7:181)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/daemon.py#L83-L95" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.daemon.DaemonApiMixin:info` (83:95)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/exec_api.py#L5-L176" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.exec_api.ExecApiMixin` (5:176)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/exec_api.py#L7-L78" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.exec_api.ExecApiMixin:exec_create` (7:78)</a>
### Build System
Manages the process of building Docker images from Dockerfiles, including context archiving, file exclusion, and authentication for base image pulls.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/build.py#L11-L352" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.build.BuildApiMixin` (11:352)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/api/build.py#L12-L275" target="_blank" rel="noopener noreferrer">`docker-py.docker.api.build.BuildApiMixin:build` (12:275)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/build.py#L70-L120" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.build.create_archive` (70:120)</a>
### Authentication & Configuration
Manages Docker registry authentication, credential storage, Docker context profiles (connection settings), and general configuration file loading and parsing.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L75-L306" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.AuthConfig` (75:306)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/auth.py#L144-L189" target="_blank" rel="noopener noreferrer">`docker-py.docker.auth.AuthConfig:load_config` (144:189)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/credentials/store.py#L11-L93" target="_blank" rel="noopener noreferrer">`docker-py.docker.credentials.store.Store` (11:93)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/context.py#L16-L249" target="_blank" rel="noopener noreferrer">`docker-py.docker.context.context.Context` (16:249)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/context/api.py#L15-L206" target="_blank" rel="noopener noreferrer">`docker-py.docker.context.api.ContextAPI` (15:206)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/config.py#L51-L66" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.config:load_general_config` (51:66)</a>
### Transport Layer
Handles low-level communication protocols for connecting to the Docker daemon, supporting Npipe, Unix sockets, and SSH. It manages HTTP connection pooling and socket operations.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/npipesocket.py#L29-L203" target="_blank" rel="noopener noreferrer">`docker-py.docker.transport.npipesocket.NpipeSocket` (29:203)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py#L45-L86" target="_blank" rel="noopener noreferrer">`docker-py.docker.transport.unixconn.UnixHTTPAdapter` (45:86)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/transport/sshconn.py#L159-L250" target="_blank" rel="noopener noreferrer">`docker-py.docker.transport.sshconn.SSHHTTPAdapter` (159:250)</a>
### Error Handling
Defines and manages custom exceptions specific to Docker operations, providing a structured way to report and handle various error conditions encountered during API interactions or client-side processing.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L42-L89" target="_blank" rel="noopener noreferrer">`docker-py.docker.errors.APIError` (42:89)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/errors.py#L13-L19" target="_blank" rel="noopener noreferrer">`docker-py.docker.errors.DockerException` (13:19)</a>
### Data Models & Utilities
Provides structured data models for various Docker API objects and configurations, along with a collection of general-purpose helper functions for data parsing, environment variable handling, version comparisons, and stream processing.
**Related Classes/Methods**:
- <a href="https://github.com/docker/docker-py/blob/master/docker/tls.py#L6-L67" target="_blank" rel="noopener noreferrer">`docker-py.docker.tls.TLSConfig` (6:67)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/types/containers.py#L264-L662" target="_blank" rel="noopener noreferrer">`docker-py.docker.types.containers.HostConfig` (264:662)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/utils.py#L10-L500" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.utils` (10:500)</a>
- <a href="https://github.com/docker/docker-py/blob/master/docker/utils/json_stream.py#L35-L40" target="_blank" rel="noopener noreferrer">`docker-py.docker.utils.json_stream:json_stream` (35:40)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)