Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for automatically passing environment variable CI=true as a predefined ARG #5673

Open
rstanevich opened this issue Jan 20, 2025 · 0 comments

Comments

@rstanevich
Copy link

Currently, to use CI as a build argument, it must be explicitly declared with an ARG directive in the Dockerfile:

ARG CI

Desired Behavior:

For example, allow CI=true to be passed automatically when specified via --opt=build-arg:CI=true without requiring the explicit ARG declaration, similar to how http_proxy, https_proxy, etc. are handled.

Rationale:

CI=true is a common convention across CI engines. Development tools and utilities may adjust their behavior when detecting they're running in a CI environment. And most Dockerfile's RUN commands execute those dev tools.

Having the ability to set CI=true available in the environment without requiring an explicit ARG declaration would streamline configurations and ensure/enforce consistent behavior

Refs:

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

No branches or pull requests

2 participants