Compare commits

..
Author SHA1 Message Date
brian.long bc6d60b094 Merge branch 'develop' into develop-jbr25 2026-05-21 20:20:45 -04:00
brian.long f4140cf68a remove CMD 2026-05-21 20:17:53 -04:00
brian.long 712a1d5e1e refactored to use base image 2026-05-21 20:01:29 -04:00
brian.long 95e5226a49 Merge branch 'develop' into develop-jbr25 2026-05-21 09:18:48 -04:00
brian.long 88cd66eed9 added additional tag 2026-05-21 09:10:34 -04:00
brian.long 468182fbc7 Merge branch 'develop' into develop-jbr25 2026-05-20 17:07:04 -04:00
brian.long 0cf13fd6b9 added cacert generation 2026-05-20 17:05:13 -04:00
brian.long 2fe6a2962e jbr 25.0.3b480.61 2026-05-20 16:35:08 -04:00
brian.long 3833e5da8f jbr 21.0.11b1163.116 2026-05-20 16:33:23 -04:00
brian.long 6c23bedeb6 switch to debian base 2026-05-20 16:30:43 -04:00
brian.long 3110974360 upgrade kubernetes-maven-plugin 2026-05-20 14:50:54 -04:00
brian.long efdfe420f8 hotswap v2.0.3 2026-03-24 09:22:54 -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
5 changed files with 175 additions and 127 deletions
+21 -17
View File
@@ -1,28 +1,40 @@
FROM ubuntu:${ubuntu.version} FROM docker.inteligr8.com/inteligr8/base:${base.image.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-jbr
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 # these are effectively immutable; provided to be used by extending images
# the entrypoint will re-set these in case they are changed
ENV JAVA_HOME=/usr/local/lib/jvm/java-openjdk-jbr
ENV JRE_HOME=/usr/local/lib/jvm/java-openjdk-jbr
# Install essentials for Java
RUN apt update && \ RUN apt update && \
apt -y install curl apt -y install libfreetype6 fontconfig fonts-dejavu ca-certificates-java
# Download & Install JBR Java # Download & Install JBR Java
RUN mkdir -p /usr/local/lib/jvm && \ RUN mkdir -p /usr/local/lib/jvm && \
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 && \
curl -L https://cache-redirector.jetbrains.com/intellij-jbr/${jbr.filename} -o java-openjdk-jbr.tar.gz && \
tar xzvf java-openjdk-jbr.tar.gz && \ tar xzvf java-openjdk-jbr.tar.gz && \
mv ${jbr.basename} java-openjdk-jbr && \ mv ${jbr.basename} java-openjdk-jbr && \
mkdir -p java-openjdk-jbr/lib/hotswap && \ mkdir -p java-openjdk-jbr/lib/hotswap && \
rm java-openjdk-jbr.tar.gz rm java-openjdk-jbr.tar.gz && \
cd ../../bin && \
ln -s ../lib/jvm/java-openjdk-jbr/bin/java . && \
ln -s ../lib/jvm/java-openjdk-jbr/bin/keytool .
# Configure `cacerts`
RUN update-ca-certificates && \
cd /usr/local/lib/jvm/java-openjdk-jbr/lib/security && \
rm cacerts && \
ln -s /etc/ssl/certs/java/cacerts .
# 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/java-openjdk-jbr/lib/hotswap/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
@@ -34,18 +46,10 @@ 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/${namespace.prefix}-setenv.sh ADD --chmod=755 maven/setenv.sh ${CONTAINERD_ENTRYPOINT_PATH}/10-setenv-${artifactId}.sh
ADD maven/target/docker-entrypoint.sh /usr/local/bin
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 --chmod=644 maven/hotswap-agent.properties /var/lib/jvm/lib
# Listening for Java debugger traffic # Listening for Java debugger traffic
EXPOSE 8000 EXPOSE 8000
# Running as ROOT user for now
#USER java
# Execute the Docker container initialization script
ENTRYPOINT [ "/usr/local/bin/docker-entrypoint.sh" ]
-9
View File
@@ -1,9 +0,0 @@
#!/bin/sh
. /usr/local/bin/${namespace.prefix}-setenv.sh
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/lib/*:/var/lib/jvm/dev/lib-extra1/*:/var/lib/jvm/dev/lib-extra2/*:/var/lib/jvm/dev/lib-extra3/*:/var/lib/jvm/dev/lib-extra4/*:/var/lib/jvm/dev/lib-extra5/*:/var/lib/jvm/dev/lib-extra6/*:/var/lib/jvm/dev/lib-extra7/*"
EXEC_JAVA_OPTS="${JAVA_OPTS} -classpath ${JAVA_CP}"
exec ${JAVA_HOME}/bin/java ${EXEC_JAVA_OPTS} ${JAVA_CLASS}
+150 -101
View File
@@ -1,111 +1,160 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.inteligr8</groupId> <groupId>com.inteligr8</groupId>
<artifactId>jdk-hotswap</artifactId> <artifactId>jdk-hotswap</artifactId>
<version>1.4.1-jbr-17.0.8</version> <version>${hotswap.version}-jbr-${jbr.version}</version>
<name>Java Hotswap Kit 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 --> <!-- See: https://git.inteligr8.com/inteligr8/base-image -->
<!-- See: https://hub.docker.com/_/ubuntu --> <!-- See: https://repos.inteligr8.com/nexus/service/rest/repository/browse/inteligr8-docker-public/v2/inteligr8/base/tags/ -->
<!-- This has very little impact and may be replaced --> <base.image.version>1.0-deb12</base.image.version>
<ubuntu.version>23.04</ubuntu.version>
<namespace.prefix>${project.artifactId}</namespace.prefix> <!-- The version of the Hotswap Agent to use -->
<!-- See: https://github.com/HotswapProjects/HotswapAgent/releases -->
<hotswap.version>2.0.3</hotswap.version>
<!-- The version of the Hotswap Agent to use --> <!-- The version of the JetBrains JDK -->
<!-- See: https://github.com/HotswapProjects/HotswapAgent/releases --> <!-- See: https://github.com/JetBrains/JetBrainsRuntime/releases -->
<hotswap.version>1.4.1</hotswap.version> <jbr.version>25.0.3</jbr.version>
<jbr.buildNumber>480.61</jbr.buildNumber>
<jbr.basename>jbr_jcef-${jbr.version}-linux-x64-b${jbr.buildNumber}</jbr.basename>
<jbr.filename>${jbr.basename}.tar.gz</jbr.filename>
<jbr.version>17.0.8</jbr.version> <!-- The Docker image meta-data for pushing the build -->
<jbr.buildNumber>1000.22</jbr.buildNumber> <image.name>inteligr8/${project.artifactId}</image.name>
<jbr.basename>jbr_jcef-${jbr.version}-linux-x64-b${jbr.buildNumber}</jbr.basename> <image.tag>${project.version}</image.tag>
<jbr.filename>${jbr.basename}.tar.gz</jbr.filename> <image.registry>docker.inteligr8.com</image.registry>
<!-- The Docker image meta-data for pushing the build --> <!-- using version properties so they can be overridden by child projects or Maven executions -->
<image.name>inteligr8/${project.artifactId}</image.name> <maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
<image.tag>${project.version}</image.tag> <maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
<image.registry>docker.inteligr8.com</image.registry> <kubernetes-maven-plugin.version>1.19.0</kubernetes-maven-plugin.version>
</properties> <regex-maven-plugin.version>1.0.7</regex-maven-plugin.version>
</properties>
<build> <build>
<resources> <resources>
<resource> <resource>
<directory>.</directory> <directory>src/main/containerd</directory>
<includes> <filtering>true</filtering>
<include>*.sh</include> <targetPath>${project.build.directory}/resources</targetPath>
<include>*.properties</include> </resource>
</includes> </resources>
<filtering>true</filtering> <pluginManagement>
<targetPath>${project.build.directory}</targetPath> <plugins>
</resource> <plugin>
</resources> <artifactId>maven-resources-plugin</artifactId>
<plugins> <version>${maven-resources-plugin.version}</version>
<plugin> </plugin>
<artifactId>maven-resources-plugin</artifactId> <plugin>
<version>3.3.1</version> <artifactId>maven-deploy-plugin</artifactId>
<executions> <version>${maven-deploy-plugin.version}</version>
<execution> </plugin>
<id>copy-resources</id> <plugin>
<phase>process-resources</phase> <groupId>org.eclipse.jkube</groupId>
<goals><goal>resources</goal></goals> <artifactId>kubernetes-maven-plugin</artifactId>
<configuration> <version>${kubernetes-maven-plugin.version}</version>
<encoding>utf-8</encoding> </plugin>
<propertiesEncoding>utf-8</propertiesEncoding> <plugin>
</configuration> <groupId>com.inteligr8</groupId>
</execution> <artifactId>regex-maven-plugin</artifactId>
</executions> <version>${regex-maven-plugin.version}</version>
</plugin> </plugin>
<!-- This plugin build and pushes the Docker image --> </plugins>
<plugin> </pluginManagement>
<groupId>org.eclipse.jkube</groupId> <plugins>
<artifactId>kubernetes-maven-plugin</artifactId> <plugin>
<version>1.14.0</version> <groupId>com.inteligr8</groupId>
<configuration> <artifactId>regex-maven-plugin</artifactId>
<images> <executions>
<image> <execution>
<name>${image.name}:${image.tag}</name> <id>determine-jbr-major-version</id>
<registry>${image.registry}</registry> <phase>validate</phase>
</image> <goals>
</images> <goal>replace-property</goal>
<contextDir>${project.build.directory}</contextDir> </goals>
<verbose>true</verbose> <configuration>
</configuration> <property>jbr.version</property>
<executions> <newProperty>jbr.majorVersion</newProperty>
<!-- This execution builds the Docker image --> <regexes>
<execution> <regex>
<id>docker-build</id> <pattern>([^.]+).*</pattern>
<phase>package</phase> <replacement>$1</replacement>
<goals><goal>build</goal></goals> </regex>
</execution> </regexes>
<!-- This execution pushes the built Docker image to the configured Docker Registry --> </configuration>
<execution> </execution>
<id>docker-push</id> </executions>
<phase>deploy</phase> </plugin>
<goals><goal>push</goal></goals> <plugin>
</execution> <artifactId>maven-resources-plugin</artifactId>
</executions> <executions>
</plugin> <execution>
<!-- This plugin prevents the project from deploying to the Maven Repository, as it is pointless --> <id>copy-resources</id>
<plugin> <phase>process-resources</phase>
<artifactId>maven-deploy-plugin</artifactId> <goals><goal>resources</goal></goals>
<version>3.1.1</version> <configuration>
<configuration> <encoding>utf-8</encoding>
<skip>true</skip> <propertiesEncoding>utf-8</propertiesEncoding>
</configuration> </configuration>
</plugin> </execution>
</plugins> </executions>
</build> </plugin>
<!-- This plugin build and pushes the Docker image -->
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>kubernetes-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<contextDir>${project.build.directory}/resources</contextDir>
<dockerFile>${project.basedir}/Containerfile</dockerFile>
<tags>
<tag>${hotswap.version}-jbr${jbr.majorVersion}</tag>
</tags>
</build>
</image>
</images>
<verbose>true</verbose>
</configuration>
<executions>
<!-- This execution builds the Docker image -->
<execution>
<id>docker-build</id>
<phase>package</phase>
<goals><goal>build</goal></goals>
</execution>
<!-- This execution pushes the built Docker image to the configured Docker Registry -->
<execution>
<id>docker-push</id>
<phase>deploy</phase>
<goals><goal>push</goal></goals>
</execution>
</executions>
</plugin>
<!-- This plugin prevents the project from deploying to the Maven Repository, as it is pointless -->
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles> <profiles>
<profile> <profile>
<id>no-docker</id> <id>no-docker</id>
<properties> <properties>
<jkube.build.strategy>jib</jkube.build.strategy> <jkube.build.strategy>jib</jkube.build.strategy>
</properties> </properties>
</profile> </profile>
</profiles> </profiles>
</project> </project>
@@ -1,4 +1,8 @@
#!/bin/sh #!/bin/sh
# immutable
JAVA_HOME=/usr/local/lib/jvm/java-openjdk-jbr
JRE_HOME=/usr/local/lib/jvm/java-openjdk-jbr
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