Having successfully transitioned my native host deployment of NXRM to run inside a docker container (see here), I decided to embark upon the same process for my IQ server.
My objective is to run IQ Server in a docker container, whilst retaining existing scan results and configuration established through deploying IQ on my native host machine. I also need to reference the same key-store and config.yml, thus ensuring a seamless transition from native to docker container deployment.
I referenced the /sonatype/nexus-iq-server instructions to achieve my objective.
The command to run IQ inside a docker container and achieve the aforementioned objectives is:
docker run -d -p 8070:8070 -p 8433:8433 --name nexus-iq -v /native-host-install-dir/sonatype-work/clm-server:/sonatype-work -v /nxrm-native-host-install-dir/etc/ssl/:/etc/ssl -v /native-host-install-dir/:/etc/nexus-iq-server -e JAVA_OPTS="-Ddw.sonatypeWork=/sonatype-work" Kevins-MBP.home:18080/sonatype/nexus-iq-server
The nexus related arguments are explained below:
The docker image references /sonatype work. This volume mounts the location of the sonatype-work used on my native IQ installation with the docker image mount point.
The docker image references /etc/ssl/keystore.jks when connecting using SSL. This volume mounts the location of the keystore used on my native NXRM installation with the docker image mount point.
The docker image references /etc/nexus-iq-server in order to find config.yml. This volume mounts the location of the native IQ installation with the docker image mount point.
Having identified the native installation of config.yml to the docker container, I need to explicitly override the value of the sonatypeWork configuration parameter contained therein.
This demonstrates that the docker image that I will run is the one that I have cached in Nexus Repository Manager.