Skip to content

feat: add compose pull command support#238

Merged
joshrotenberg merged 2 commits intojoshrotenberg:mainfrom
skharchikov:feat/compose-pull-command
Mar 3, 2026
Merged

feat: add compose pull command support#238
joshrotenberg merged 2 commits intojoshrotenberg:mainfrom
skharchikov:feat/compose-pull-command

Conversation

@skharchikov
Copy link
Copy Markdown
Contributor

@skharchikov skharchikov commented Feb 24, 2026

Summary

While rewriting shell scripts to a Rust TUI, I was using docker-wrapper and encountered the need for a compose pull command.

  • Add ComposePullCommand with builder pattern matching existing compose commands
  • Support all docker compose pull flags: --ignore-buildable, --ignore-pull-failures, --include-deps, --policy, --quiet
  • Add PullPolicy enum (Always, Missing) for type-safe policy selection
  • Target specific services or pull all services at once

Reference: Docker Compose Pull docs

Add `ComposePullCommand` with options for ignore-buildable,
ignore-pull-failures, include-deps, pull policy and quiet mode
@skharchikov skharchikov force-pushed the feat/compose-pull-command branch from d32b439 to 1a182c8 Compare February 24, 2026 17:50
@joshrotenberg
Copy link
Copy Markdown
Owner

Nice, thanks for this!

One thing to address before merging: there's already a PullPolicy enum defined in
src/command/compose/create.rs (and up.rs) with three variants (Always, Never, Missing). The
new one in pull.rs defines a second PullPolicy with only Always and Missing.

Could you reuse the existing PullPolicy from create.rs instead of defining a new one? Maybe it makes sense to move it up to the top level compose.rs since its used in > 1 place now ...

@skharchikov
Copy link
Copy Markdown
Contributor Author

One thing to address before merging: there's already a PullPolicy enum defined in src/command/compose/create.rs (and up.rs) with three variants (Always, Never, Missing).

I decided introduce a new one because according to the doc it has only 2 options: Always | Missing. It doesn't support Never.
I was thinking to name it PullPullPolicy, but it looks odd

@skharchikov
Copy link
Copy Markdown
Contributor Author

@joshrotenberg wdyt would be the best option to proceed around PullPolicy enum?

@joshrotenberg
Copy link
Copy Markdown
Owner

Fair point -- you're right that pull only supports Always and Missing, so reusing the 3-variant enum would be a bit misleading. Let's keep them separate. Maybe just name it ComposePullPolicy to avoid confusion with the existing PullPolicy?

@skharchikov
Copy link
Copy Markdown
Contributor Author

Fair point -- you're right that pull only supports Always and Missing, so reusing the 3-variant enum would be a bit misleading. Let's keep them separate. Maybe just name it ComposePullPolicy to avoid confusion with the existing PullPolicy?

fixed

@joshrotenberg joshrotenberg merged commit 923aa2a into joshrotenberg:main Mar 3, 2026
11 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 3, 2026
@joshrotenberg
Copy link
Copy Markdown
Owner

Merged, 0.11.1 is running now. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants