Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 222b63f15d | |||
| 7a91327b7f | |||
| 65915646ed | |||
| b7e9f09126 | |||
| 04c718287b | |||
| 2d1f4aaa59 | |||
| 6de8a22e19 |
+7
-5
@@ -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.2.0-01
|
||||
ARG NEXUS_VERSION=3.3.1-01
|
||||
ARG NEXUS_DOWNLOAD_URL=https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz
|
||||
|
||||
RUN yum install -y \
|
||||
@@ -60,7 +60,11 @@ RUN mkdir -p ${NEXUS_HOME} \
|
||||
# configure nexus
|
||||
RUN sed \
|
||||
-e '/^nexus-context/ s:$:${NEXUS_CONTEXT}:' \
|
||||
-i ${NEXUS_HOME}/etc/nexus-default.properties
|
||||
-i ${NEXUS_HOME}/etc/nexus-default.properties \
|
||||
&& sed \
|
||||
-e '/^-Xms/d' \
|
||||
-e '/^-Xmx/d' \
|
||||
-i ${NEXUS_HOME}/bin/nexus.vmoptions
|
||||
|
||||
RUN useradd -r -u 200 -m -c "nexus role account" -d ${NEXUS_DATA} -s /bin/false nexus \
|
||||
&& mkdir -p ${NEXUS_DATA}/etc ${NEXUS_DATA}/log ${NEXUS_DATA}/tmp ${SONATYPE_WORK} \
|
||||
@@ -73,8 +77,6 @@ EXPOSE 8081
|
||||
USER nexus
|
||||
WORKDIR ${NEXUS_HOME}
|
||||
|
||||
ENV JAVA_MAX_MEM=1200m \
|
||||
JAVA_MIN_MEM=1200m \
|
||||
EXTRA_JAVA_OPTS=""
|
||||
ENV INSTALL4J_ADD_VM_PARAMS="-Xms1200m -Xmx1200m"
|
||||
|
||||
CMD ["bin/nexus", "run"]
|
||||
|
||||
@@ -44,19 +44,14 @@ $ docker logs -f nexus
|
||||
logs, and storage. This directory needs to be writable by the Nexus
|
||||
process, which runs as UID 200.
|
||||
|
||||
* Three environment variables can be used to control the JVM arguments
|
||||
* There is an environment variable that can used to pass JVM arguments to the startup script
|
||||
|
||||
* `JAVA_MAX_MEM`, passed as -Xmx. Defaults to `1200m`.
|
||||
* `INSTALL4J_ADD_VM_PARAMS`, passed to the Install4J startup script. Defaults to `-Xms1200m -Xmx1200m`.
|
||||
|
||||
* `JAVA_MIN_MEM`, passed as -Xms. Defaults to `1200m`.
|
||||
|
||||
* `EXTRA_JAVA_OPTS`. Additional options can be passed to the JVM via
|
||||
this variable.
|
||||
|
||||
These can be used supplied at runtime to control the JVM:
|
||||
This can be supplied at runtime:
|
||||
|
||||
```
|
||||
$ docker run -d -p 8081:8081 --name nexus -e JAVA_MAX_MEM=768m sonatype/nexus3
|
||||
$ docker run -d -p 8081:8081 --name nexus -e INSTALL4J_ADD_VM_PARAMS="-Xms2g -Xmx2g" sonatype/nexus3
|
||||
```
|
||||
|
||||
* Another environment variable can be used to control the Nexus Context Path
|
||||
@@ -108,6 +103,6 @@ docker build --rm --tag nexus-custom --build-arg NEXUS_VERSION=3.x.y --build-arg
|
||||
|
||||
Looking to contribute to our Docker image but need some help? There's a few ways to get information or our attention:
|
||||
|
||||
* File a public issue [here on GitHub](https://github.com/sonatype/docker-nexus3/issues)
|
||||
* File an issue [on our public JIRA](https://issues.sonatype.org/projects/NEXUS/)
|
||||
* Check out the [Nexus3](http://stackoverflow.com/questions/tagged/nexus3) tag on Stack Overflow
|
||||
* Check out the [Nexus Repository User List](https://groups.google.com/a/glists.sonatype.com/forum/?hl=en#!forum/nexus-users)
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ version: "2"
|
||||
|
||||
services:
|
||||
nexus:
|
||||
image: sonatype/docker-nexus3
|
||||
image: sonatype/nexus3
|
||||
volumes:
|
||||
- "nexus-data:/nexus-data"
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user