Docker Nexus image is launching Nexus in PRO mode

I am trying to update our sonatype nexus (OSS 3.13.0-01).
I am using a Dockerfile with a newer nexus version and mount it on the actual data directory. It all goes well but it starts as PRO and asks for license. How do I force it to launch as OSS ?
I am trying to pass the nexus-default.properties but still starts as PRO edition…

Dockerfile command:
COPY nexus-default.properties ${SONATYPE_DIR}/etc/nexus-default.properties

Content of nexus.default.properties

Jetty section

application-port=8081
application-host=0.0.0.0
nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml
nexus-context-path=/${NEXUS_CONTEXT}

Nexus section

nexus-edition=nexus-oss-edition
nexus-features=nexus-oss-feature
nexus.loadAsOSS=true

nexus-pro-feature

nexus.clustered=false

Thanks in advance :slight_smile:

What does $workdir/etc/nexus.properties have in it? Also be aware that if any system properties are getting passed in (e.g. “java -Dnexus-edition=…”) they could also be taking precedence.

/etc/nexus.properties have:

Jetty section

application-port=8081

application-host=0.0.0.0

nexus-args=${jetty.etc}/jetty.xml,${jetty.etc}/jetty-http.xml,${jetty.etc}/jetty-requestlog.xml

nexus-context-path=/${NEXUS_CONTEXT}

Nexus section

nexus-edition=nexus-oss-edition
nexus-features=nexus-oss-feature

nexus-pro-feature

nexus.clustered=false

And the java opts are:
/usr/lib/jvm/java-1.8.0/bin/java -server -Dinstall4j.jvmDir=/usr/lib/jvm/java-1.8.0 -Dexe4j.moduleName=/opt/sonatype/nexus/bin/nexus -XX:+UnlockDiagnosticVMOptions -Dinstall4j.launcherId=245 -Dinstall4j.swt=false -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Di4jv=0 -Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=2g -Djava.util.prefs.userRoot=/nexus-data/javaprefs -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=…/sonatype-work/nexus3/log/jvm.log -XX:-OmitStackTraceInFastThrow -Djava.net.preferIPv4Stack=true -Dkaraf.home=. -Dkaraf.base=. -Dkaraf.etc=etc/karaf -Djava.util.logging.config.file=etc/karaf/java.util.logging.properties -Dkaraf.data=…/sonatype-work/nexus3 -Dkaraf.log=…/sonatype-work/nexus3/log -Djava.io.tmpdir=…/sonatype-work/nexus3/tmp -Dkaraf.startLocalConsole=false -Djava.endorsed.dirs=lib/endorsed -Di4j.vpt=true -classpath /opt/sonatype/nexus/.install4j/i4jruntime.jar:/opt/sonatype/nexus/lib/boot/nexus-main.jar:/opt/sonatype/nexus/lib/boot/activation-1.1.1.jar:/opt/sonatype/nexus/lib/boot/jaxb-api-2.2.7.jar:/opt/sonatype/nexus/lib/boot/jaxb-core-2.2.7.jar:/opt/sonatype/nexus/lib/boot/jaxb-impl-2.2.7.jar:/opt/sonatype/nexus/lib/boot/org.apache.karaf.main-4.2.6.jar:/opt/sonatype/nexus/lib/boot/org.osgi.core-6.0.0.jar:/opt/sonatype/nexus/lib/boot/org.apache.karaf.specs.activator-4.2.6.jar:/opt/sonatype/nexus/lib/boot/org.apache.karaf.diagnostic.boot-4.2.6.jar:/opt/sonatype/nexus/lib/boot/org.apache.karaf.jaas.boot-4.2.6.jar com.install4j.runtime.launcher.UnixLauncher run 9d17dc87 0 0 org.sonatype.nexus.karaf.NexusMain

FYI, the nexus-default.properties is not meant to be edited. It is there as a default for new installations, you are supposed to edit the one Rich mentioned. It appears they are not the same (unless you pasted differently). I suggest taking a backup of both files, then making them the same (copying default to $data-dir) and seeing if that helps.

If it does, don’t edit the default one going forward as suggested=)
Best,
Joe

Thanks guys it worked. I had to pass it to the default.properties before the:
CMD [“sh”, “-c”, “${SONATYPE_DIR}/start-nexus-repository-manager.sh”]
And then it starts as OSS-feature