diff --git a/pom.xml b/pom.xml index d835986..1f82850 100644 --- a/pom.xml +++ b/pom.xml @@ -11,41 +11,81 @@ 2.3 + 2.0.3-jbr21 - tomcat-rad - 11.0.22 - 11 https://archive.apache.org/dist/tomcat inteligr8/${project.artifactId} ${project.version} docker.inteligr8.com + + + 3.5.0 + 3.1.4 + 1.19.0 + 1.0.7 - src/main/docker + src/main/containerd true ${project.build.directory}/resources + + maven-resources-plugin + ${maven-resources-plugin.version} + + + maven-deploy-plugin + ${maven-deploy-plugin.version} + org.eclipse.jkube kubernetes-maven-plugin - 1.19.0 + ${kubernetes-maven-plugin.version} + + + com.inteligr8 + regex-maven-plugin + ${regex-maven-plugin.version} + + com.inteligr8 + regex-maven-plugin + + + determine-tomcat-major-version + validate + + replace-property + + + tomcat.version + tomcat.majorVersion + + + ([^.]+).* + $1 + + + + + + maven-resources-plugin @@ -71,6 +111,7 @@ ${image.registry} ${project.build.directory}/resources + Containerfile ${base.version}-tomcat${tomcat.majorVersion} @@ -108,7 +149,7 @@ no-docker - true + jib diff --git a/src/main/docker/Dockerfile b/src/main/containerd/Containerfile similarity index 78% rename from src/main/docker/Dockerfile rename to src/main/containerd/Containerfile index 2ac44dc..197f663 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/containerd/Containerfile @@ -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 # Add our Docker container initialization script -ADD maven/setenv.sh /usr/local/bin/${namespace.prefix}-setenv.sh -COPY maven/docker-entrypoint.sh /usr/local/bin -RUN chmod 755 /usr/local/bin/docker-entrypoint.sh +ADD --chmod=755 maven/setenv.sh ${CONTAINERD_ENTRYPOINT_PATH}/40-setenv-${artifactId}.sh # Add our Apache Tomcat configuration # This gives us dynamic injection points into the running webapps -COPY maven/tomcat-context.xml /var/lib/tomcat/conf/context.xml -ADD maven/hotswap-agent.properties /var/lib/tomcat/lib +ADD --chmod=644 maven/tomcat-context.xml /var/lib/tomcat/conf/context.xml +ADD --chmod=644 maven/hotswap-agent.properties /var/lib/tomcat/lib # Listening for HTTP (not HTTPS) traffic 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 CMD [ "/usr/local/share/tomcat/bin/catalina.sh", "run" ] diff --git a/src/main/docker/hotswap-agent.properties b/src/main/containerd/hotswap-agent.properties similarity index 100% rename from src/main/docker/hotswap-agent.properties rename to src/main/containerd/hotswap-agent.properties diff --git a/src/main/docker/setenv.sh b/src/main/containerd/setenv.sh similarity index 100% rename from src/main/docker/setenv.sh rename to src/main/containerd/setenv.sh diff --git a/src/main/docker/tomcat-context.xml b/src/main/containerd/tomcat-context.xml similarity index 100% rename from src/main/docker/tomcat-context.xml rename to src/main/containerd/tomcat-context.xml diff --git a/src/main/docker/docker-entrypoint.sh b/src/main/docker/docker-entrypoint.sh deleted file mode 100644 index 2256618..0000000 --- a/src/main/docker/docker-entrypoint.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -. /usr/local/bin/jdk-hotswap-setenv.sh -. /usr/local/bin/${namespace.prefix}-setenv.sh - -exec "$@"