Skip to content

Install FusionReactor in Docker

In the fusionreactor-docker GitHub repository we have example Dockerfiles for:

You can take these resources and use these as examples for your own Dockerfiles.

Installation example

If we take the Dockerfile for Tomcat, for example:

FROM tomcat

ADD myApp.war /usr/local/tomcat/webapps

You now add in FusionReactor by writing the following lines:

FROM tomcat

ADD myApp.war /usr/local/tomcat/webapps

#Creates a FusionReactor Directory
RUN mkdir -p /opt/fusionreactor/instance/tomcat

#Adds the fusionreactor.jar file to the instance directory
ADD /opt/fusionreactor/instance/tomcat

#Adds the debug library file to the instance directory
ADD /opt/fusionreactor/instance/tomcat

#Adds FusionReactor to the JVM arguments
ENV JAVA_OPTS="-javaagent:/opt/fusionreactor/instance/tomcat/fusionreactor.jar=name=tomcat,address=8088 -agentpath:/opt/fusionreactor/instance/tomcat/"

Adding a configuration file to Docker

The configuration of FusionReactor is stored in the reactor.conf file of your FusionReactor instance.

You can take an existing reactor.conf file from an instance of FusionReactor that has already been configured and place this in your Dockerfile. You can find the configuration of FusionReactor from another instance at {FusionReactor Directory}/instance/{Instance Name}/conf/reactor.conf. See Copying FusionReactor configuration to new instances.

The following 2 lines are all that would be required to pass in a configuration file:

RUN mkdir -p /opt/fusionreactor/instance/{Instance Name}/conf
ADD reactor.conf 
RUN mkdir -p /opt/fusionreactor/instance/{Instance Name}/conf

System properties to add to a container

FusionReactor has System properties to configure the instance password, license key, Enterprise Dashboard and FusionReactor Cloud. These arguments can be found in FusionReactor System Properties.

Persisting log files using Docker volumes

To persist the FusionReactor logs outside of the container, you can use a Docker volume so that logs are stored on the host machine. For example:

docker run -v /opt/docker/share/fusionreactor/{instance name}/log:/opt/fusionreactor/instance/{instance name}/log -v /opt/docker/share/fusionreactor/{instance name}/archive:/opt/fusionreactor/instance/{instance name}/archive ...

Docker compose

  - /opt/docker/share/fusionreactor/{instance name}/log:/opt/fusionreactor/instance/{instane name}/log
  - /opt/docker/share/fusionreactor/{instance name}/archive:/opt/fusionreactor/instance/{instance name}/archive


Java Docker

ColdFusion Docker

Configuring Docker

Need more help?

Contact support in the chat bubble and let us know how we can assist.