Skip to content

Java application servers' docker images with DCEVM and HotswapAgent

License

Notifications You must be signed in to change notification settings

HotswapProjects/hotswap-docklands

Repository files navigation

Hotswap-docklands

License

Adam Bien's Docklands with HotswapAgent and DCEVM.

Motivation:

Add advanced hotswap support allowing addition/modification/removal of classes/methods/fields of application running in Docker without restarts. Inject new code/resources (html/xhtml etc..) from your IDE to application running in Docker without restarts.

Quick start:

Install desired container image

Each folder represents a Dockerfile which can be built by executing the build.sh command.

Add docker container hotswap support to your project

Copy following files from reference project to your project:

  1. Dockerfile
  • modify name of ping.war to your_project.war
  • optionally modify parent image name FROM to desired container image name
  • optionally change exposed debug port 8000
  1. hotswap-agent.properties to your project's resources directory.
  2. buildAndRunDebug.sh
  • rename target image name from hotswap-ping to something different

Build & execute dockerized application using buildAndRunDebug.sh script. Next:

  • Debug your application attaching your debugger to port 8000
  • Make some advance code change in your project and build the project. Class changes are automatically promoted to running docker container via debugger. Even if the debugger is not attached, the class changes are promoted via extra_class_path, that is used prior standard classpath.

HotswapAgent allows to add a directory prior to webapp path (load webapp resources) using property webappDir. For proper functionality of webappDir it is necessary to add -v /var/run/docker.sock:/var/run/docker.sock to docker command.

About

Java application servers' docker images with DCEVM and HotswapAgent

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published