ranger icon indicating copy to clipboard operation
ranger copied to clipboard

RANGER-4942: Fix Dockerfiles of ./build_ranger_using_docker.sh

Open marco-luzzara opened this issue 1 year ago • 0 comments

What changes were proposed in this pull request?

This PR fixes some syntactic mistakes on the Dockerfiles involved in the Ranger build in a Dockerized environment. The 3 main issues I have fixed are:

  • RUN if [ "${OS_NAME}" == "UBUNTU" ]; then ...: the commands enclosed in this if-condition will never be executed because the shell used for this command is /bin/sh, which requires a single = for string comparison.

  • For some reasons, the ENV JAVA_HOME /usr/lib/... Dockerfile command is placed inside the RUN command. I put it before the RUN command in order to use the JAVA_HOME env variable in the shell script.

  • Many env variables are initialized using the alternative syntax ENV MY_ENV_VAR value1, which is not compliant with the guidelines, that suggests using ENV MY_ENV_VAR=value1. I quote from the ENV reference:

    The alternative syntax is supported for backward compatibility, but discouraged for the reasons outlined above, and may be removed in a future release.

    I rewrote only some of them, in case you preferred another PR for a general Dockerfile/compose improvements.

How was this patch tested?

By running ./build_ranger_using_docker.sh

marco-luzzara avatar Sep 26 '24 14:09 marco-luzzara