Re:Introducing Jib — Build Java Docker images better
by kinghajj on Tuesday July 10, 2018 @03:07PM
(#17501162)
At work, I setup the build system to use Apache Archiva to cache Java dependencies, along with other services like apt-cacher, devpi, and squid, for Debian, Python, and general HTTP caching, respectively. We build all of our images atop the "bitnami/minideb" base, and split the Dockerfiles into "partials" that source a dynamic parent image via a build argument. For example, the partial that sets up Debian package and HTTP caching:
For Java, another partial creates a Maven settings file with the Apache Archiva URL:
The important part of settings.xml is this section:
And voila, Maven will go through Archiva for all its dependencies, which are transparently cached so that subsequent builds don't need to re-download everything again.
[ Parent
| on HN ]
There are no comments on this comment yet.