Skip to content

Install FusionReactor in Docker

In the fusionreactor-docker GitHub repository https://github.com/intergral/fusionreactor-docker we have example Dockerfiles for:

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

Installation Example

If we take an example Dockerfile for tomcat, for example:

FROM tomcat

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

You can add FusionReactor by adding 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 https://download.fusionreactor.io/FR/Latest/fusionreactor.jar /opt/fusionreactor/instance/tomcat

#Adds the debug library file to the instance directory
ADD https://download.fusionreactor.io/FR/Latest/libfrjvmti_x64.so /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/libfrjvmti_x64.so"

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

volumes:
  - /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

Videos

Java Docker

ColdFusion Docker

Configuring Docker