Hi Tibor, It has two issues:
1. It will not be the right plugin versions in 90% of the cases (except demo ;)) 2. It will miss all custom plugins Now question is: what happens if you mount your local repo when running docker? It works as expected. Means we could use a custom entrypoint printing a warning banner if it is not done probably instead of incrasing the image size without being sure to reach the original goal. Wdyt? Romain Le mer. 30 oct. 2019 à 02:03, Tibor Digana <tibordig...@apache.org> a écrit : > If you use Docker images with Maven with no mapping of cache to the > volumes, you may notice that Maven downloads the plugins for the build > lifecycle. > > This slows down the build because a lot of artifacts and plugins are > initially downloaded. > This takes 50 seconds which might be even longer than the productive build > itself (compiler, package, ...). > > We discussed this topic with Herve and Karl at the Apache CON 2019 the last > time. > > Sometime the presentations were funny because the audience had to wait a > minute while the console was black where the Maven was downloading the > plugins in the background. > Nobody was sure what happened that time, whether the console hanged or the > Cloud server hanged, or another issue happened with the network. > > I made a test and triggered the default lifecycle on Maven and I realized > that the cache was really very little, cca 12 MB. > So this little cache in the container would save 50 seconds which is the > improvement we are discussing. > > From the use point of view, the user would use a new base image ` > 3.6.2-jdk-14-prefetched` which is my idea. > > There are multiple technical solutions (range of plugins, extra pom, > internal Maven plugin versions, etc). > > We understood that the best idea would be to have the image with the cache > in new Docker images produced by Carloss Sanchez. > > We are discussing this topic in [1] but we do not have a consensus on who > will develop the Docker scripts and how. > > We can continue here and we can propose a solution. > > [1] https://github.com/carlossg/docker-maven/issues/130 > > > Cheers > Tibor17 >