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
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.
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:
docker-py.docker.api.build.BuildApiMixin(11:352)docker-py.docker.api.build.BuildApiMixin:build(12:275)docker-py.docker.api.build.BuildApiMixin:_set_auth_headers(321:352)docker-py.docker.api.build.process_dockerfile(355:382)docker-py.docker.models.images.ImageCollection:build(220:315)
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:
docker-py.docker.utils.build:create_archive(70:120)docker-py.docker.utils.build:exclude_paths(41:55)docker-py.docker.utils.build:tar(22:38)docker-py.docker.utils.build.PatternMatcher(159:219)docker-py.docker.utils.build.PatternMatcher:matches(166:183)docker-py.docker.utils.build.build_file_list(58:67)docker-py.docker.utils.build.mkbuildcontext(123:139)docker-py.docker.utils.fnmatch:fnmatch(26:44)docker-py.docker.utils.fnmatch:fnmatchcase(47:60)docker-py.docker.utils.fnmatch:translate(63:115)
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:
docker-py.docker.auth:load_config(348:349)docker-py.docker.auth.AuthConfig(75:306)docker-py.docker.auth.AuthConfig.load_config(144:189)docker-py.docker.auth.AuthConfig.get_all_credentials(285:303)docker-py.docker.auth.AuthConfig._get_store_instance(272:277)docker-py.docker.auth.AuthConfig._resolve_authconfig_credstore(244:270)docker-py.docker.auth.convert_to_hostname(315:316)docker-py.docker.auth.encode_header(327:329)docker-py.docker.auth.resolve_authconfig(309:312)docker-py.docker.auth.decode_auth(319:324)docker-py.docker.auth.parse_auth(332:345)docker-py.docker.auth._load_legacy_config(352:378)
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:
docker-py.docker.utils.utils:version_lt(77:78)docker-py.docker.utils.utils:version_gte(81:82)docker-py.docker.utils.utils:compare_version(49:74)docker-py.docker.utils.decorators:minimum_version(24:34)
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:
docker-py.docker.utils.json_stream:json_stream(35:40)docker-py.docker.utils.json_stream:split_buffer(50:74)docker-py.docker.utils.json_stream.stream_as_text(9:19)docker-py.docker.utils.json_stream.line_splitter(43:47)
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: