ranger
ranger copied to clipboard
RANGER-3310 build_ranger_using_docker.sh does not reuse maven local c…
issue: https://issues.apache.org/jira/browse/RANGER-3310
Description
The command 'stat -c "%u" pom.xml' is used to get the UID from host. However, the command is not supported by macOS. Hence, macOS users can't pass 'mvn xxxx' to call build_ranger_using_docker.sh since it causes error like "stat: illegal option -- c". The maven cache of host is mounted to correct path when the command line starts with "mvn". In other words, macOS users can't reuse maven cache and all dependencies have to be download again...
This patch aims to add following changes.
- instead of using gosu, we directly align UDI inside/outside containers (the container can modify the .m2 folder of host)
- mount the m2 folder to correct path when running container.
Test Result (macOS M1)
./build_ranger_using_docker.sh 2>&1 > ~/log
Test Result (ubuntu 21.04 amd64)
./build_ranger_using_docker.sh 2>&1 > ~/log
Test Result (macOS amd64)
./build_ranger_using_docker.sh 2>&1 > ~/log
the CI fix is related to #105
Run this patch on three platforms (macOS m1, macOS amd64 and ubuntu amd64). all works well.
@mneethiraj Could you please take a look? this PR fixes the tool of building code by docker. Furthermore, it fixes the broker maven url.
@chia7712 - dev-support/ranger-docker directory has updated setup to build and run Ranger in docker container. I suggest to use this instead of build_ranger_using_docker.sh.
dev-support/ranger-docker directory has updated setup to build and run Ranger in docker container. I suggest to use this instead of build_ranger_using_docker.sh.
Thanks for the suggestion! Should we remove this file if there is already replacement?