ranger icon indicating copy to clipboard operation
ranger copied to clipboard

RANGER-4750: Optimizations in the docker image build process

Open kumaab opened this issue 1 year ago • 0 comments

What changes were proposed in this pull request?

Restructure the downloads of service tarballs from download-archives.sh to Dockerfile.ranger-service as part of the image build for respective services.

Key highlights:

  • When building specific images (eg: ranger-hadoop, ranger-hive), only hadoop and hive tarballs are downloaded bringing down the time taken to bring up the containers effectively.
  • Allows to take advantage of docker parallelization thereby allowing parallel service tarball downloads. Currently, the service tarball downloads happen in a sequential manner with download-archives.sh.
  • Although subject to network speeds, this also has shown minor improvements in overall build times for all images.

How was this patch tested?

Command to bring up containers:

  • docker-compose -f docker-compose.ranger-base.yml -f docker-compose.ranger.yml -f docker-compose.ranger-${RANGER_DB_TYPE}.yml -f docker-compose.ranger-usersync.yml -f docker-compose.ranger-tagsync.yml -f docker-compose.ranger-kms.yml -f docker-compose.ranger-hadoop.yml -f docker-compose.ranger-hbase.yml -f docker-compose.ranger-kafka.yml -f docker-compose.ranger-hive.yml -f docker-compose.ranger-trino.yml -f docker-compose.ranger-knox.yml build

kumaab avatar Mar 16 '24 01:03 kumaab