Skip to content

Comments

HIVE-29065: Fix Dockerfile warnings - FromAsCasing and InvalidDefault…#6332

Open
kokila-19 wants to merge 1 commit intoapache:masterfrom
kokila-19:docker_build_warn_fix
Open

HIVE-29065: Fix Dockerfile warnings - FromAsCasing and InvalidDefault…#6332
kokila-19 wants to merge 1 commit intoapache:masterfrom
kokila-19:docker_build_warn_fix

Conversation

@kokila-19
Copy link
Contributor

…ArgInFrom

What changes were proposed in this pull request?
In the Dockerfile, Match the case for all keywords (UPPER CASE).
Default value for BUILD_ENV argument. "FROM" determines the base image for the build and arg BUILD_ENV is used here. If it is empty/invalid , the image will not be created. So docker lint checks for this issue. To avoid it, a default value needs to set.

Why are the changes needed?
To remove the warnings thrown during docker build.

 => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 19)                                                                                                                           
 => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 24)                                                                                                                            
 => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 36)                                                                                                                            
 => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 47)                                                                                                                            
 => WARN: InvalidDefaultArgInFrom: Default value for ARG ${BUILD_ENV} results in empty or invalid base image name (line 47) 

Does this PR introduce any user-facing change?
No

How was this patch tested?
Create the docker image using build script for both hive and hms image.
./build.sh

@sonarqubecloud
Copy link

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants