JRebel with Docker¶
JRebel remote server functionality is available for virtual machines running on Docker. The following details need to be kept in mind when running JRebel with Docker.
The Docker container needs to include the JRebel Agent and its platform-specific library. You can download the newest JRebel here.
You need to enable JRebel for the application server in Docker. Add
-Drebel.remoting_plugin=trueto the startup parameters. You will need to replace the library placeholder with the correct operating system and 32 or 64 bit library:
Windows 64-bit JDK
Windows 32-bit JDK
Mac OS X 64-bit JDK
Mac OS X 32-bit JDK
Linux 64-bit JDK
Linux 32-bit JDK
The JRebel IDE plugin and project need to be configured with the remote server information. You need to enable remote server support for the project and configure the JRebel IDE plugin to connect to the Docker server. For more information, refer to remote server overview.
Refer to the running servers from command line chapter to learn more about adding JRebel to various application servers.
Example for JRebel with Docker and Tomcat 8.0 (Linux 64-bit)¶
jrebel.jarfrom the root and
libfolder of the downloaded archive. Copy these files to the folder that you will use to generate the image.
Create a new
Dockerfilein the same folder with the following content:
FROM tomcat:8.0 COPY jrebel.jar /jrebel.jar COPY libjrebel64.so /libjrebel64.so ENV JAVA_OPTS="-agentpath:/libjrebel64.so -Drebel.remoting_plugin=true"
Build your Docker image.
$ docker build -t [desired image title] .
Run your Docker container!
To use remote server functionality, add your Docker server address to your IDE workspace for synchronization.