RANGER-5301: Fix InvalidDefaultArgInFrom Warnings in docker build#813
Merged
RANGER-5301: Fix InvalidDefaultArgInFrom Warnings in docker build#813
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses BuildKit warnings during Docker builds by adding sentinel placeholder values to ARG declarations in Dockerfiles. The warnings occurred because ARG variables used in FROM statements had no default values, resulting in empty or invalid base image names during validation.
Changes:
- Added sentinel placeholder default values (e.g.,
_RANGER_BASE_IMAGE_,_ZK_VERSION_) to all ARG declarations that are used in FROM statements - Applied this pattern consistently across 18 Dockerfile configurations
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| dev-support/ranger-docker/Dockerfile.ranger-zk | Added placeholder default for ZK_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-usersync | Added placeholder defaults for RANGER_BASE_IMAGE and RANGER_BASE_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-trino | Added placeholder default for TRINO_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-tagsync | Added placeholder defaults for RANGER_BASE_IMAGE and RANGER_BASE_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-sqlserver | Added placeholder default for SQLSERVER_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-solr | Added placeholder default for SOLR_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-postgres | Added placeholder default for POSTGRES_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-ozone | Added placeholder defaults for OZONE_RUNNER_IMAGE and OZONE_RUNNER_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-oracle | Added placeholder default for ORACLE_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-mysql | Added placeholder default for MARIADB_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-knox | Added placeholder defaults for RANGER_BASE_IMAGE and RANGER_BASE_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-kms | Added placeholder defaults for RANGER_DB_TYPE, RANGER_BASE_IMAGE, and RANGER_BASE_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-kafka | Added placeholder defaults for RANGER_BASE_IMAGE and RANGER_BASE_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-hive | Added placeholder defaults for RANGER_BASE_IMAGE and RANGER_BASE_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-hbase | Added placeholder defaults for RANGER_BASE_IMAGE and RANGER_BASE_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-hadoop | Added placeholder defaults for RANGER_BASE_IMAGE and RANGER_BASE_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger-build | Added placeholder defaults for RANGER_BASE_IMAGE and RANGER_BASE_BUILD_VERSION |
| dev-support/ranger-docker/Dockerfile.ranger | Added placeholder defaults for RANGER_DB_TYPE, RANGER_BASE_IMAGE, and RANGER_BASE_VERSION |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8bb72fc to
ad7a21e
Compare
mneethiraj
reviewed
Jan 23, 2026
mneethiraj
approved these changes
Jan 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Warnings from BuildKit during the docker build:
To silence these warnings, the best way seems to be to use sentinel placeholders instead of duplicating raw values from
.envfile. Maintaining versions in multiple files is an overhead so using placeholders is a good approach to take.Update
Using placeholders doesn't solve the warnings, so using default values - the values may remain the same over time as overrides are in place using
docker composeHow was this patch tested?
The warnings are no longer seen in the docker builds in CI.