# Using your existing Nexus IQ configuration and key-store inside a Docker image

**URL:** <https://community.sonatype.com/t/using-your-existing-nexus-iq-configuration-and-key-store-inside-a-docker-image/1115>\
**Category:** Sonatype Lifecycle & Firewall\
**Created:** [January 25, 2019, 1:09pm UTC](https://community.sonatype.com/t/using-your-existing-nexus-iq-configuration-and-key-store-inside-a-docker-image/1115 "2019-01-25T13:09:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![kmatthews](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/kmatthews/32/353_2.png) [@kmatthews](https://community.sonatype.com/u/kmatthews)\
**Post date:** [January 25, 2019, 1:09pm UTC](https://community.sonatype.com/t/using-your-existing-nexus-iq-configuration-and-key-store-inside-a-docker-image/1115/1 "2019-01-25T13:09:52Z")

</div>

Having successfully transitioned my native host deployment of NXRM to run inside a docker container [(see here)](http://community.sonatype.com/t/using-your-existing-nexus-repository-configuration-and-key-store-inside-a-docker-image/994), 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](https://hub.docker.com/r/sonatype/nexus-iq-server#runtime-server-configuration) 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:

- -v /native-host-install-dir/sonatype-work/clm-server:/sonatype-work  
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.

- -v /nxrm-native-host-install-dir/etc/ssl/:/etc/ssl  
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.

- -v /native-host-install-dir/:/etc/nexus-iq-server  
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.

- -e JAVA\_OPTS="-Ddw.sonatypeWork=/sonatype-work"  
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.

- Kevins-MBP.home:18080/sonatype/nexus-iq-server  
This demonstrates that the docker image that I will run is the one that I have cached in Nexus Repository Manager.

---

_[View the full topic](https://community.sonatype.com/t/using-your-existing-nexus-iq-configuration-and-key-store-inside-a-docker-image/1115)._
