Compare commits

..
Author SHA1 Message Date
brian.long 8ccbdefbce jbr v25.0.2 2026-03-24 09:31:12 -04:00
brian.long 03d37fc28f jbr v21.0.10 2026-03-24 09:28:37 -04:00
brian.long 7a1119a870 maven-resources-plugin to v3.5.0 2026-03-24 09:28:25 -04:00
brian.long 6d2f68bc33 hotswap v2.0.3
(cherry picked from commit efdfe420f8)
2026-03-24 09:24:04 -04:00
brian.long 031b9209e3 jbr v21.0.7 2025-05-27 16:59:44 -04:00
brian.long d0063bcd52 jbr v17.0.14 2025-05-27 16:56:35 -04:00
brian.long 3628dd49f4 added fonts-dejavu 2025-05-27 16:51:16 -04:00
brian.long a7a9d8ca7d added fontconfig 2025-01-31 17:08:22 -05:00
brian.long 30ec25f019 refactored; downgrade to jkuke v1.16.2 2025-01-31 16:40:20 -05:00
brian.long fb0267bb13 v2.01-jbr-17.0.12 pom 2025-01-31 15:59:42 -05:00
brian.long e80b70a0cb added libfreetype6 (jdk SunFont needs it) 2025-01-31 15:59:39 -05:00
brian.long 7a1ccfead3 v1.4.1-jbr-17.0.11 pom 2024-08-07 11:22:45 -04:00
brian.long 315bf2c9e1 upgraded various versions 2024-08-07 11:20:45 -04:00
brian.long 27abe6e394 jbr v17.0.10 2024-03-14 12:18:06 -04:00
brian.long bf5701b959 TravaOpenJDK to Jetbrains JBR for jdk17 support 2023-09-05 15:34:38 -04:00
6 changed files with 37 additions and 41 deletions
+14 -13
View File
@@ -4,27 +4,28 @@ FROM ubuntu:${ubuntu.version}
# Configure standard JAVA parameters # Configure standard JAVA parameters
ENV JAVA_MEMORY_INIT=128m ENV JAVA_MEMORY_INIT=128m
ENV JAVA_MEMORY_MAX=512m ENV JAVA_MEMORY_MAX=512m
ENV JAVA_HOME=/usr/local/lib/jvm/java-openjdk-dcevm ENV JAVA_HOME=/usr/local/lib/jvm/java-openjdk-jbr
ENV JRE_HOME=/usr/local/lib/jvm/java-openjdk-dcevm ENV JRE_HOME=/usr/local/lib/jvm/java-openjdk-jbr
ENV JAVA_OPTS= ENV JAVA_OPTS=
ENV ENABLE_HOTSWAP=true ENV ENABLE_HOTSWAP=true
ENV ENABLE_JDWP=true ENV ENABLE_JDWP=true
ENV DISABLE_HOTSWAP_PLUGINS= ENV DISABLE_HOTSWAP_PLUGINS=
# Install curl # Install curl & essentials
RUN apt update && \ RUN apt update && \
apt -y install curl apt -y install curl libfreetype6 fontconfig fonts-dejavu
# Download & Install DCEVM Java # Download & Install JBR Java
RUN mkdir -p /usr/local/lib/jvm && \ RUN mkdir -p /usr/local/lib/jvm && \
curl -L https://github.com/TravaOpenJDK/trava-jdk-${dcevm.majorVersion}-dcevm/releases/download/dcevm-${dcevm.version}/${dcevm.filename} -o /usr/local/lib/jvm/java-openjdk-dcevm.tar.gz && \ curl -L https://cache-redirector.jetbrains.com/intellij-jbr/${jbr.filename} -o /usr/local/lib/jvm/java-openjdk-jbr.tar.gz && \
cd /usr/local/lib/jvm && \ cd /usr/local/lib/jvm && \
tar xzvf java-openjdk-dcevm.tar.gz && \ tar xzvf java-openjdk-jbr.tar.gz && \
mv dcevm-${dcevm.version} java-openjdk-dcevm && \ mv ${jbr.basename} java-openjdk-jbr && \
rm java-openjdk-dcevm.tar.gz mkdir -p java-openjdk-jbr/lib/hotswap && \
rm java-openjdk-jbr.tar.gz
# Download Hotswap Agent # Download Hotswap Agent
RUN curl -L https://github.com/HotswapProjects/HotswapAgent/releases/download/RELEASE-${hotswap.version}/hotswap-agent-${hotswap.version}.jar -o /usr/local/lib/jvm/hotswap-agent.jar RUN curl -L https://github.com/HotswapProjects/HotswapAgent/releases/download/RELEASE-${hotswap.version}/hotswap-agent-${hotswap.version}.jar -o /usr/local/lib/jvm/java-openjdk-jbr/lib/hotswap/hotswap-agent.jar
# Add directories for dynamic injection points # Add directories for dynamic injection points
RUN mkdir -p /var/lib/jvm && cd /var/lib/jvm && \ RUN mkdir -p /var/lib/jvm && cd /var/lib/jvm && \
@@ -33,12 +34,12 @@ RUN mkdir -p /var/lib/jvm && cd /var/lib/jvm && \
mkdir lib lib-extra1 lib-extra2 lib-extra3 lib-extra4 lib-extra5 lib-extra6 lib-extra7 mkdir lib lib-extra1 lib-extra2 lib-extra3 lib-extra4 lib-extra5 lib-extra6 lib-extra7
# Add our Docker container initialization scripts # Add our Docker container initialization scripts
ADD maven/target/setenv.sh /usr/local/bin/${dcevm.prefix}-setenv.sh ADD maven/target/resources/setenv.sh /usr/local/bin/${namespace.prefix}-setenv.sh
ADD maven/target/docker-entrypoint.sh /usr/local/bin ADD maven/target/resources/docker-entrypoint.sh /usr/local/bin
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh RUN chmod 755 /usr/local/bin/docker-entrypoint.sh
# Add our default hotswap configuration; may be overwritten in dev/classes* volumes # Add our default hotswap configuration; may be overwritten in dev/classes* volumes
ADD maven/target/hotswap-agent.properties /var/lib/jvm/lib ADD maven/target/resources/hotswap-agent.properties /var/lib/jvm/lib
# Listening for Java debugger traffic # Listening for Java debugger traffic
EXPOSE 8000 EXPOSE 8000
+1 -1
View File
@@ -1,7 +1,7 @@
# Java Application Container Image with Hot-Reloading # Java Application Container Image with Hot-Reloading
This project creates a Docker image that has uses both the [Trava DCEVM](http://dcevm.github.io/) and [Hotswap Agent](http://hotswapagent.org/) and the Java JDWP debugger. The combination of these utilities allows for the hot-reloading of Java resources and classes to enable rapid application development and debugging capabilties. As a Docker image, containers can be started to facilitate development without requiring complicated installations on developer workstations. This project creates a Docker image that has uses both the [Jetbrains JDK](https://github.com/JetBrains/JetBrainsRuntime) and [Hotswap Agent](http://hotswapagent.org/) and the Java JDWP debugger. The combination of these utilities allows for the hot-reloading of Java resources and classes to enable rapid application development and debugging capabilties. As a Docker image, containers can be started to facilitate development without requiring complicated installations on developer workstations.
It is expected that containers are configured in Maven using the Fabric8 or Spotify Docker plugins. These configurations should expose the 8000 (debugger) port and any other port that the application may open. Most importantly, it should mount/bind the source code to the following possible paths. It is expected that containers are configured in Maven using the Fabric8 or Spotify Docker plugins. These configurations should expose the 8000 (debugger) port and any other port that the application may open. Most importantly, it should mount/bind the source code to the following possible paths.
+20 -25
View File
@@ -2,31 +2,29 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.inteligr8</groupId> <groupId>com.inteligr8</groupId>
<artifactId>java-dcevm-hotswap</artifactId> <artifactId>jdk-hotswap</artifactId>
<version>11.0.15-1.4.1</version> <version>${hotswap.version}-jbr-${jbr.version}</version>
<name>Java DCEVM for Rapid Application Development</name> <name>Java Hotswap Kit for Rapid Application Development</name>
<packaging>pom</packaging> <packaging>pom</packaging>
<properties> <properties>
<!-- The release version of Ubuntu to use as the base --> <!-- The release version of Ubuntu to use as the base -->
<!-- See: https://hub.docker.com/_/ubuntu --> <!-- See: https://hub.docker.com/_/ubuntu -->
<!-- This has very little impact and may be replaced --> <!-- This has very little impact and may be replaced -->
<ubuntu.version>20.04</ubuntu.version> <ubuntu.version>25.04</ubuntu.version>
<dcevm.prefix>${project.artifactId}</dcevm.prefix>
<!-- The version of Java DCEVM to use for executing Apache Tomcat --> <namespace.prefix>${project.artifactId}</namespace.prefix>
<!-- See: https://github.com/TravaOpenJDK/trava-jdk-11-dcevm/releases -->
<dcevm.version>11.0.15+1</dcevm.version>
<dcevm.majorVersion>11</dcevm.majorVersion>
<dcevm.os-arch>linux-x64</dcevm.os-arch>
<!-- v11.0.10
<dcevm.filename>java${dcevm.majorVersion}-openjdk-dcevm-${dcevm.os-arch}.tar.gz</dcevm.filename>
-->
<dcevm.filename>Openjdk${dcevm.majorVersion}u-dcevm-${dcevm.os-arch}.tar.gz</dcevm.filename>
<!-- The version of the Hotswap Agent to use --> <!-- The version of the Hotswap Agent to use -->
<!-- See: https://github.com/HotswapProjects/HotswapAgent/releases --> <!-- See: https://github.com/HotswapProjects/HotswapAgent/releases -->
<hotswap.version>1.4.1</hotswap.version> <hotswap.version>2.0.3</hotswap.version>
<!-- The version of the JetBrains JDK -->
<!-- See: https://github.com/JetBrains/JetBrainsRuntime/releases -->
<jbr.version>25.0.2</jbr.version>
<jbr.buildNumber>329.72</jbr.buildNumber>
<jbr.basename>jbr_jcef-${jbr.version}-linux-x64-b${jbr.buildNumber}</jbr.basename>
<jbr.filename>${jbr.basename}.tar.gz</jbr.filename>
<!-- The Docker image meta-data for pushing the build --> <!-- The Docker image meta-data for pushing the build -->
<image.name>inteligr8/${project.artifactId}</image.name> <image.name>inteligr8/${project.artifactId}</image.name>
@@ -37,19 +35,15 @@
<build> <build>
<resources> <resources>
<resource> <resource>
<directory>.</directory> <directory>src/main/docker</directory>
<includes>
<include>*.sh</include>
<include>*.properties</include>
</includes>
<filtering>true</filtering> <filtering>true</filtering>
<targetPath>${project.build.directory}</targetPath> <targetPath>${project.build.directory}/resources</targetPath>
</resource> </resource>
</resources> </resources>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version> <version>3.5.0</version>
<executions> <executions>
<execution> <execution>
<id>copy-resources</id> <id>copy-resources</id>
@@ -66,7 +60,7 @@
<plugin> <plugin>
<groupId>org.eclipse.jkube</groupId> <groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId> <artifactId>kubernetes-maven-plugin</artifactId>
<version>1.14.0</version> <version>1.16.2</version> <!-- later versions isn't working; investigate -->
<configuration> <configuration>
<images> <images>
<image> <image>
@@ -74,7 +68,8 @@
<registry>${image.registry}</registry> <registry>${image.registry}</registry>
</image> </image>
</images> </images>
<contextDir>${project.build.directory}</contextDir> <contextDir>${project.build.directory}/resources</contextDir>
<dockerFile>${project.basedir}/Dockerfile</dockerFile>
<verbose>true</verbose> <verbose>true</verbose>
</configuration> </configuration>
<executions> <executions>
@@ -95,7 +90,7 @@
<!-- This plugin prevents the project from deploying to the Maven Repository, as it is pointless --> <!-- This plugin prevents the project from deploying to the Maven Repository, as it is pointless -->
<plugin> <plugin>
<artifactId>maven-deploy-plugin</artifactId> <artifactId>maven-deploy-plugin</artifactId>
<version>3.1.1</version> <version>3.1.4</version>
<configuration> <configuration>
<skip>true</skip> <skip>true</skip>
</configuration> </configuration>
@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
. /usr/local/bin/${dcevm.prefix}-setenv.sh . /usr/local/bin/${namespace.prefix}-setenv.sh
JAVA_CP="/var/lib/jvm/lib:/var/lib/jvm/lib/*" JAVA_CP="/var/lib/jvm/lib:/var/lib/jvm/lib/*"
JAVA_CP="${JAVA_CP}:/var/lib/jvm/dev/classes:/var/lib/jvm/dev/classes-extra1:/var/lib/jvm/dev/classes-extra2:/var/lib/jvm/dev/classes-extra3:/var/lib/jvm/dev/classes-extra4:/var/lib/jvm/dev/classes-extra5:/var/lib/jvm/dev/classes-extra6:/var/lib/jvm/dev/classes-extra7" JAVA_CP="${JAVA_CP}:/var/lib/jvm/dev/classes:/var/lib/jvm/dev/classes-extra1:/var/lib/jvm/dev/classes-extra2:/var/lib/jvm/dev/classes-extra3:/var/lib/jvm/dev/classes-extra4:/var/lib/jvm/dev/classes-extra5:/var/lib/jvm/dev/classes-extra6:/var/lib/jvm/dev/classes-extra7"
+1 -1
View File
@@ -2,7 +2,7 @@
JAVA_OPTS="${JAVA_OPTS} -Xms${JAVA_MEMORY_INIT} -Xmx${JAVA_MEMORY_MAX}" JAVA_OPTS="${JAVA_OPTS} -Xms${JAVA_MEMORY_INIT} -Xmx${JAVA_MEMORY_MAX}"
if [ "${ENABLE_HOTSWAP}" = "true" ]; then if [ "${ENABLE_HOTSWAP}" = "true" ]; then
JAVA_OPTS="${JAVA_OPTS} -XX:HotswapAgent=external -javaagent:/usr/local/lib/jvm/hotswap-agent.jar" JAVA_OPTS="${JAVA_OPTS} -XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar"
JAVA_OPTS="${JAVA_OPTS} -Dhotswap.disablePlugins=${DISABLE_HOTSWAP_PLUGINS}" JAVA_OPTS="${JAVA_OPTS} -Dhotswap.disablePlugins=${DISABLE_HOTSWAP_PLUGINS}"
fi fi