feat(container): configure pull handler at container creation#110
Merged
mdelapenya merged 3 commits intodocker:mainfrom Oct 22, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for configuring custom pull handlers when creating containers, enabling customization of image pull behavior beyond the default implementation.
Key Changes:
- Introduces
WithPullHandleroption to allow custom pull handlers during container creation - Updates container lifecycle to pass pull options through to the image pull operation
- Adds comprehensive test coverage for the new pull handler functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| container/definition.go | Adds pullOptions field to store custom pull options in the Definition struct |
| container/options.go | Implements WithPullHandler function to configure custom pull handlers |
| container/options_test.go | Tests basic functionality of the WithPullHandler option |
| container/lifecycle.go | Integrates pull options into the image pull operation during container creation |
| container/lifecycle.create_test.go | Adds integration test verifying pull handler works end-to-end with platform specification |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
mdelapenya
added a commit
to ndeloof/go-sdk
that referenced
this pull request
Nov 6, 2025
* main: feat(wait): add human-readable String() methods to all wait strategies (docker#119) feat(image): display formatted pull progress on Windows terminals (docker#118) chore(release): add Go proxy refresh automation (docker#117) chore(release): bump module versions chore(release): prevent for pushing to personal forks (docker#115) chore(release): add pre-release checks to make the release process more consistent (docker#114) chore(volume): return pointer in FindByID (docker#105) fix(container): proper error message on empty container names (docker#113) fix(container): add to nil modifiers (docker#112) feat(container): add new functional options to add container config, hostConfig and endpointSettings (docker#111) feat(container): configure pull handler at container creation (docker#110)
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.
What does this PR do?
It adds a new functional option as an alias for the image.WithPullHandler.
Why is it important?
Creating a container with a different pull handler was not possible before this adapter, as the code always used the default one.