xetus-oss / docker-archiva

A docker image for Apache Archiva
Apache License 2.0
55 stars 34 forks source link

A set of tweaks, mainly supporting the new `-XX:+UseContainerSupport #20

Closed tkent closed 4 years ago

tkent commented 4 years ago

Based on our experience running this image in k8s, a few changes to avoid over-consumption of resources (specifically memory)

Main changes:

  1. Add the -XX:+UseContainerSupport argument to the java command, this avoids the common scenario where the JVM would consume more memory than allocated to it through cgroups.
  2. Remove support for the JVM_MAX_MEM environment variable. Since Java 8u191, it's much better to use the native UseContainerSupport feature. For folks that want to granularly manage the heap, they can use JVM_EXTRA_OPTS

Related changes:

  1. Added a changelog for this feature, assuming this will go out as v2.2.4-1
  2. Moved to using docker-compose v2. This is required for testing, since docker-compose v3 doesn't support memory limits/cpu limits in v3.
  3. Updated the archiva download URL, since the old FQDN is no longer working.
tmeneau commented 4 years ago

Sorry for the delay in merging this! Thanks for making these changes, they look great. As you requested, we're going to merge this into a new v2.2.4-1 branch since this adds new environment variables and memory management not supported in previous versions of the image.