2

I am developing scala inside a docker container with Gradle. But when after I change my code and run ./gradlew azkabanZipRain -p <package-name>, the building and packaging runs for almost 1 hour, which is incredibly long. The building and packaging normally takes 2 to 3 mins to finish outside docker on the host. Does anyone know why?

The container has 6 cpus and 20G memory, which is far more than it needs. But still very slow. The first 89% of the process is pretty fast, which can be finished around 1 mins. But from 90% to finish, it will take 30 mins to a hour. Really weird. The two steps that cost lots of time are :glencoePublishZip and :azkabanZipPURPLE.

It seems it takes forever building zip files insider docker.

Ted Wang
  • 21
  • 2
  • Can you provide a [mcve]? Is this running in a Dockerfile `RUN` instruction, or somewhere else? (A frequent pattern for JVM-based languages is to compile the application on the host and only `COPY` the built jar file into the image.) – David Maze Aug 11 '21 at 11:04
  • I cannot really provide a minimum version since the code I use is confidential and it is not easy to produce a equivalent one... But the building isn't happen in image building process but inside container. After the image have been build and the container is started, we developing inside it. After some code change, we want to build inside the container and run the command there. It takes longer time than on the real host... – Ted Wang Aug 11 '21 at 20:28

0 Answers0