ranger icon indicating copy to clipboard operation
ranger copied to clipboard

RANGER-3310 build_ranger_using_docker.sh does not reuse maven local c…

Open chia7712 opened this issue 3 years ago • 5 comments

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.

  1. instead of using gosu, we directly align UDI inside/outside containers (the container can modify the .m2 folder of host)
  2. mount the m2 folder to correct path when running container.

Test Result (macOS M1)

./build_ranger_using_docker.sh 2>&1 > ~/log

RANGER-3310.log

Test Result (ubuntu 21.04 amd64)

./build_ranger_using_docker.sh 2>&1 > ~/log

RANGER-3310.log

Test Result (macOS amd64)

./build_ranger_using_docker.sh 2>&1 > ~/log

RANGER-3310.log

chia7712 avatar Jun 07 '21 09:06 chia7712

the CI fix is related to #105

chia7712 avatar Jun 11 '21 08:06 chia7712

Run this patch on three platforms (macOS m1, macOS amd64 and ubuntu amd64). all works well.

chia7712 avatar Jun 15 '21 11:06 chia7712

@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 avatar Aug 24 '21 10:08 chia7712

@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.

mneethiraj avatar Aug 24 '21 14:08 mneethiraj

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?

chia7712 avatar Aug 24 '21 14:08 chia7712