Compare commits

..

5 Commits

Author SHA1 Message Date
Brad Beck cb564dbfd9 Updating to NXRM 3.5.2-01 2017-09-12 16:19:26 -05:00
Brad Beck e780ba3300 [NEXUS-13905] Put java user prefs in work directory (#77) 2017-09-12 08:26:28 -05:00
Brad Beck cff6c5c21c [NEXUS-14196] Expose MaxDirectMemorySize via INSTALL4J_ADD_VM_PARAMS (#76) 2017-08-31 16:38:30 -05:00
Brad Beck b06afeab86 update java 2017-08-31 15:43:17 -05:00
Brad Beck dbc580e6ab Updating to NXRM 3.5.1-02 2017-08-23 13:16:04 -05:00
2 changed files with 11 additions and 7 deletions
+6 -5
View File
@@ -20,7 +20,7 @@ LABEL vendor=Sonatype \
com.sonatype.license="Apache License, Version 2.0" \
com.sonatype.name="Nexus Repository Manager base image"
ARG NEXUS_VERSION=3.5.0-02
ARG NEXUS_VERSION=3.5.2-01
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
RUN yum install -y \
@@ -30,9 +30,9 @@ RUN yum install -y \
# configure java runtime
ENV JAVA_HOME=/opt/java \
JAVA_VERSION_MAJOR=8 \
JAVA_VERSION_MINOR=141 \
JAVA_VERSION_BUILD=15 \
JAVA_DOWNLOAD_HASH=336fa29ff2bb4ef291e347e091f7f4a7
JAVA_VERSION_MINOR=144 \
JAVA_VERSION_BUILD=01 \
JAVA_DOWNLOAD_HASH=090f390dda5b47b9b721c7dfaa008135
# configure nexus runtime
ENV SONATYPE_DIR=/opt/sonatype
@@ -65,6 +65,7 @@ RUN sed \
&& sed \
-e '/^-Xms/d' \
-e '/^-Xmx/d' \
-e '/^-XX:MaxDirectMemorySize/d' \
-i ${NEXUS_HOME}/bin/nexus.vmoptions
RUN useradd -r -u 200 -m -c "nexus role account" -d ${NEXUS_DATA} -s /bin/false nexus \
@@ -78,6 +79,6 @@ EXPOSE 8081
USER nexus
WORKDIR ${NEXUS_HOME}
ENV INSTALL4J_ADD_VM_PARAMS="-Xms1200m -Xmx1200m"
ENV INSTALL4J_ADD_VM_PARAMS="-Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=2g -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs"
CMD ["bin/nexus", "run"]
+5 -2
View File
@@ -75,14 +75,17 @@ process, which runs as UID 200.
* There is an environment variable that can used to pass JVM arguments to the startup script
* `INSTALL4J_ADD_VM_PARAMS`, passed to the Install4J startup script. Defaults to `-Xms1200m -Xmx1200m`.
* `INSTALL4J_ADD_VM_PARAMS`, passed to the Install4J startup script. Defaults to `-Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=2g -Djava.util.prefs.userRoot=${NEXUS_DATA}/javaprefs`.
This can be supplied at runtime:
```
$ docker run -d -p 8081:8081 --name nexus -e INSTALL4J_ADD_VM_PARAMS="-Xms2g -Xmx2g" sonatype/nexus3
$ docker run -d -p 8081:8081 --name nexus -e INSTALL4J_ADD_VM_PARAMS="-Xms2g -Xmx2g -XX:MaxDirectMemorySize=3g -Djava.util.prefs.userRoot=/some-other-dir" sonatype/nexus3
```
Of particular note, `-Djava.util.prefs.userRoot=/some-other-dir` can be set to a persistent path, which will maintain
the installed Nexus Repository License if the container is restarted.
* Another environment variable can be used to control the Nexus Context Path
* `NEXUS_CONTEXT`, defaults to /