Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
baff429fe3 | ||
|
|
11dcc50a0c | ||
|
|
6b88cbe3e8 | ||
|
|
086a17cf98 | ||
|
|
b7ff68327a | ||
|
|
35c38baa30 | ||
|
|
849cfde955 |
@@ -11,35 +11,83 @@
|
|||||||
<base.version>2.3</base.version>
|
<base.version>2.3</base.version>
|
||||||
|
|
||||||
<!-- The release version of the Java Hotswap Docker image -->
|
<!-- The release version of the Java Hotswap Docker image -->
|
||||||
<!-- See: https://bitbucket.org/inteligr8/jdk-hotswap-docker -->
|
<!-- See: https://git.inteligr8.com/inteligr8/jdk-hotswap-image -->
|
||||||
<jdk-hotswap.version>2.0.3-jbr-21.0.10</jdk-hotswap.version>
|
<!-- See: https://repos.inteligr8.com/nexus/service/rest/repository/browse/inteligr8-docker-public/v2/inteligr8/jdk-hotswap/tags/ -->
|
||||||
|
<jdk-hotswap.version>2.0.3-jbr17</jdk-hotswap.version>
|
||||||
<namespace.prefix>tomcat-rad</namespace.prefix>
|
|
||||||
|
|
||||||
<!-- The version of Apache Tomcat to serve as the basis of this Docker image -->
|
<!-- The version of Apache Tomcat to serve as the basis of this Docker image -->
|
||||||
<!-- See: https://tomcat.apache.org/download-10.cgi -->
|
<!-- See: https://tomcat.apache.org/download-10.cgi -->
|
||||||
<tomcat.version>11.0.20</tomcat.version>
|
<tomcat.version>10.1.55</tomcat.version>
|
||||||
<tomcat.majorVersion>11</tomcat.majorVersion>
|
|
||||||
<tomcat.mirror.baseUrl>https://archive.apache.org/dist/tomcat</tomcat.mirror.baseUrl>
|
<tomcat.mirror.baseUrl>https://archive.apache.org/dist/tomcat</tomcat.mirror.baseUrl>
|
||||||
|
|
||||||
<!-- 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>
|
||||||
<image.tag>${project.version}</image.tag>
|
<image.tag>${project.version}</image.tag>
|
||||||
<image.registry>docker.inteligr8.com</image.registry>
|
<image.registry>docker.inteligr8.com</image.registry>
|
||||||
|
|
||||||
|
<!-- using version properties so they can be overridden by child projects or Maven executions -->
|
||||||
|
<maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
|
||||||
|
<maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
|
||||||
|
<kubernetes-maven-plugin.version>1.19.0</kubernetes-maven-plugin.version>
|
||||||
|
<regex-maven-plugin.version>1.0.7</regex-maven-plugin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/docker</directory>
|
<directory>src/main/containerd</directory>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
<targetPath>${project.build.directory}/resources</targetPath>
|
<targetPath>${project.build.directory}/resources</targetPath>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<version>3.5.0</version>
|
<version>${maven-resources-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>${maven-deploy-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.eclipse.jkube</groupId>
|
||||||
|
<artifactId>kubernetes-maven-plugin</artifactId>
|
||||||
|
<version>${kubernetes-maven-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.inteligr8</groupId>
|
||||||
|
<artifactId>regex-maven-plugin</artifactId>
|
||||||
|
<version>${regex-maven-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.inteligr8</groupId>
|
||||||
|
<artifactId>regex-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>determine-tomcat-major-version</id>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>replace-property</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<property>tomcat.version</property>
|
||||||
|
<newProperty>tomcat.majorVersion</newProperty>
|
||||||
|
<regexes>
|
||||||
|
<regex>
|
||||||
|
<pattern>([^.]+).*</pattern>
|
||||||
|
<replacement>$1</replacement>
|
||||||
|
</regex>
|
||||||
|
</regexes>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>copy-resources</id>
|
<id>copy-resources</id>
|
||||||
@@ -56,7 +104,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.eclipse.jkube</groupId>
|
<groupId>org.eclipse.jkube</groupId>
|
||||||
<artifactId>kubernetes-maven-plugin</artifactId>
|
<artifactId>kubernetes-maven-plugin</artifactId>
|
||||||
<version>1.19.0</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<images>
|
<images>
|
||||||
<image>
|
<image>
|
||||||
@@ -64,10 +111,13 @@
|
|||||||
<registry>${image.registry}</registry>
|
<registry>${image.registry}</registry>
|
||||||
<build>
|
<build>
|
||||||
<contextDir>${project.build.directory}/resources</contextDir>
|
<contextDir>${project.build.directory}/resources</contextDir>
|
||||||
|
<dockerFile>Containerfile</dockerFile>
|
||||||
|
<tags>
|
||||||
|
<tag>${base.version}-tomcat${tomcat.majorVersion}</tag>
|
||||||
|
</tags>
|
||||||
</build>
|
</build>
|
||||||
</image>
|
</image>
|
||||||
</images>
|
</images>
|
||||||
<buildStrategy>docker</buildStrategy>
|
|
||||||
<verbose>true</verbose>
|
<verbose>true</verbose>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
@@ -88,7 +138,6 @@
|
|||||||
<!-- 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.4</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -100,7 +149,7 @@
|
|||||||
<profile>
|
<profile>
|
||||||
<id>no-docker</id>
|
<id>no-docker</id>
|
||||||
<properties>
|
<properties>
|
||||||
<fabric8.build.jib>true</fabric8.build.jib>
|
<jkube.build.strategy>jib</jkube.build.strategy>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|||||||
@@ -28,26 +28,15 @@ RUN cd /var/lib/tomcat/dev && \
|
|||||||
mkdir web web-extra1 web-extra2 web-extra3 web-extra4 web-extra5 web-extra6 web-extra7
|
mkdir web web-extra1 web-extra2 web-extra3 web-extra4 web-extra5 web-extra6 web-extra7
|
||||||
|
|
||||||
# Add our Docker container initialization script
|
# Add our Docker container initialization script
|
||||||
ADD maven/setenv.sh /usr/local/bin/${namespace.prefix}-setenv.sh
|
ADD --chmod=755 maven/setenv.sh ${CONTAINERD_ENTRYPOINT_PATH}/40-setenv-${artifactId}.sh
|
||||||
COPY maven/docker-entrypoint.sh /usr/local/bin
|
|
||||||
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh
|
|
||||||
|
|
||||||
# Add our Apache Tomcat configuration
|
# Add our Apache Tomcat configuration
|
||||||
# This gives us dynamic injection points into the running webapps
|
# This gives us dynamic injection points into the running webapps
|
||||||
COPY maven/tomcat-context.xml /var/lib/tomcat/conf/context.xml
|
ADD --chmod=644 maven/tomcat-context.xml /var/lib/tomcat/conf/context.xml
|
||||||
ADD maven/hotswap-agent.properties /var/lib/tomcat/lib
|
ADD --chmod=644 maven/hotswap-agent.properties /var/lib/tomcat/lib
|
||||||
|
|
||||||
# Listening for HTTP (not HTTPS) traffic
|
# Listening for HTTP (not HTTPS) traffic
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
# Listening for Java debugger traffic
|
|
||||||
EXPOSE 8000
|
|
||||||
|
|
||||||
# Running as ROOT user for now
|
|
||||||
#USER tomcat
|
|
||||||
|
|
||||||
# Execute the Docker container initialization script
|
|
||||||
ENTRYPOINT [ "/usr/local/bin/docker-entrypoint.sh" ]
|
|
||||||
|
|
||||||
# Start the Apache Tomcat web container using the Catalina script
|
# Start the Apache Tomcat web container using the Catalina script
|
||||||
CMD [ "/usr/local/share/tomcat/bin/catalina.sh", "run" ]
|
CMD [ "/usr/local/share/tomcat/bin/catalina.sh", "run" ]
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
. /usr/local/bin/jdk-hotswap-setenv.sh
|
|
||||||
. /usr/local/bin/${namespace.prefix}-setenv.sh
|
|
||||||
|
|
||||||
exec "$@"
|
|
||||||
Reference in New Issue
Block a user