Phixsura opened a new pull request, #22322:
URL: https://github.com/apache/kafka/pull/22322

   Adds a repeatable `--build-arg KEY=VALUE` option to `ducker-ak up` and 
forwards each pair to the underlying `docker build` invocation. This lets 
contributors override any of the existing Dockerfile ARGs (for example 
`KAFKA_MIRROR`, `KIBOSH_VERSION`, `GRAALVM_URL`) without having to patch the 
script locally, which is exactly the use case 
[KAFKA-20377](https://issues.apache.org/jira/browse/KAFKA-20377) calls out.
   
   The flag is parsed in `ducker_up` into a bash array, then expanded after the 
existing hard coded `--build-arg` entries so any override the user passes wins 
when there is a conflict on the same ARG. With no `--build-arg` on the command 
line the array stays empty and the resulting `docker build` is byte for byte 
identical to today.
   
   Verified locally with:
   
   * `bash -n tests/docker/ducker-ak` (syntax)
   * `./tests/docker/ducker-ak --help` (usage renders the new flag)
   * A stubbed `echo_and_do` dry run with `extra_build_args=("--build-arg" 
"FOO=bar" "--build-arg" "BAZ=qux")` shows both pairs appended after the built 
in args.
   
   Example usage:
   
   ```
   ./tests/docker/ducker-ak up --build-arg 
KAFKA_MIRROR=https://my-mirror/example --build-arg 
GRAALVM_URL=https://my-mirror/graalvm.tgz
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to