Add Environment Variable for Progress Mode
Type of Change
- [ ] Bug fix
- [x] New feature
- [ ] Breaking change
- [x] Documentation update
Motivation and Context
Environment Variable for Progress Mode
Adds support for a CONTAINER_CLI_PROGRESS environment variable that allows users to set their preferred default progress mode (none, ansi, plain) without passing --progress
on every command.
This follows the same pattern as BUILDKIT_PROGRESS and aligns with the project's transition from macOS user defaults to environment variables for configuration.
Precedence: --progress flag → CONTAINER_CLI_PROGRESS env var → default (ansi)
Affected commands: container image pull, container image push, container run
Note: ~
colormode support is commented out, pending merge of #1384. Once merged, uncommentingcase colorin the enum and updating the help text is all that's needed.~
Closes #1406
Testing
- [x] Tested locally
- [x] Added/updated tests
- [x] Added/updated docs
Test Instructions
# Default (ansi) — no flag, no env var
container image pull alpine
# Env var sets mode
CONTAINER_CLI_PROGRESS=plain container image pull alpine
# Flag overrides env var
CONTAINER_CLI_PROGRESS=plain container --progress ansi image pull alpine
# Env var disables progress
CONTAINER_CLI_PROGRESS=none container image pull alpine
# Invalid env var falls back to default (ansi)
CONTAINER_CLI_PROGRESS=bogus container image pull alpine
@nrthakur You'll likely have a few more conflicts to fix since the plan is to merge #1392 next.
@nrthakur You'll likely have a few more conflicts to fix since the plan is to merge #1392 next.
@jglogan game over
jk 😛 ~fixing these for now~ fixed; will address conflicts introduced by #1392
Thanks for the heads up!
@nrthakur Did you resolve the conflicts? I currently see two files.
@nrthakur Did you resolve the conflicts? I currently see two files.
@jglogan Oops, should've been more clear, I had fixed the conflicts introduced by merging my colour PR this morning. Just addressed the conflicts introduced by #1392
This PR should be in a reviewable state now. Thanks!
Hi @jglogan Any updates with this 👀