Skip to content

Add Environment Variable for Progress Mode#1409

Open
nrthakur wants to merge 1 commit intoapple:mainfrom
nrthakur:nik/feat/progress-env-var
Open

Add Environment Variable for Progress Mode#1409
nrthakur wants to merge 1 commit intoapple:mainfrom
nrthakur:nik/feat/progress-env-var

Conversation

@nrthakur
Copy link
Copy Markdown
Contributor

@nrthakur nrthakur commented Apr 10, 2026

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • 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: color mode support is commented out, pending merge of #1384. Once merged, uncommenting case color in the enum and updating the help text is all that's needed.

Closes #1406

Testing

  • Tested locally
  • Added/updated tests
  • 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 nrthakur changed the title Add CONTAINER_CLI_PROGRESS environment variable Add Environment Variable for Progress Mode Apr 10, 2026
@jglogan
Copy link
Copy Markdown
Contributor

jglogan commented Apr 10, 2026

@nrthakur You'll likely have a few more conflicts to fix since the plan is to merge #1392 next.

@nrthakur
Copy link
Copy Markdown
Contributor Author

nrthakur commented Apr 10, 2026

@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 nrthakur force-pushed the nik/feat/progress-env-var branch from 70d2b39 to 7c48657 Compare April 10, 2026 16:31
@jglogan
Copy link
Copy Markdown
Contributor

jglogan commented Apr 11, 2026

@nrthakur Did you resolve the conflicts? I currently see two files.

@nrthakur nrthakur force-pushed the nik/feat/progress-env-var branch from 7c48657 to b110afc Compare April 11, 2026 04:21
@nrthakur
Copy link
Copy Markdown
Contributor Author

@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!

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.

[Request]: Add Environment Variable to Configure Default Progress Mode

3 participants