compose: adjust image load options for containerd storage#132
Draft
compose: adjust image load options for containerd storage#132
Conversation
Detect when the Docker daemon is backed by containerd snapshotter storage and apply compatible image load behavior. When containerd storage is in use: - disable ReadBlobsFromStore since loading layers from an external blob directory is not supported - disable ProgressReporter because image load progress is not reported - return early after ImageLoad, skipping progress stream decoding This prevents load failures and avoids misleading progress reporting when running against containerd-backed Docker engines. Signed-off-by: Mike Sul <mike.sul@foundries.io>
Add containerd-specific progress handling when loading images. Since containerd-backed Docker engines do not emit standard layer progress events, parse the ImageLoad response stream for "Loaded image:" messages and translate them into image-level progress updates. Changes include: - add ImageLoadStateImageLoading state - emit image loading/loaded progress for containerd image imports - keep early return only when no ProgressReporter is configured - update status printer to render image-level loading messages This preserves user-visible progress feedback on containerd systems while remaining compatible with standard Docker layer progress reporting. Signed-off-by: Mike Sul <mike.sul@foundries.io>
Refactor LoadImages by extracting Docker-specific progress stream handling into reportProgressIfDocker(). This removes the large state machine from LoadImages, reducing cyclomatic complexity and making the main flow easier to follow. Changes include: - delegate Docker progress parsing to reportProgressIfDocker() - keep containerd progress handling in reportProgressIfContainerd() - simplify runtime branching between Docker and containerd paths No functional changes intended. Signed-off-by: Mike Sul <mike.sul@foundries.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detect when the Docker daemon is backed by containerd snapshotter storage and apply compatible image load behavior.
When containerd storage is in use:
This prevents load failures and avoids misleading progress reporting when running against containerd-backed Docker engines.