added hotswap/dcevm
This commit is contained in:
29
Dockerfile
29
Dockerfile
@@ -1,10 +1,7 @@
|
||||
|
||||
FROM ubuntu:${ubuntu.version}
|
||||
|
||||
RUN apt update
|
||||
RUN apt -y install openjdk-${java.majorVersion}-jdk
|
||||
RUN apt -y install tomcat${tomcat.majorVersion}
|
||||
|
||||
# Configure the Apache Tomcat Catalina script
|
||||
ENV JAVA_MEMORY_INIT=128m
|
||||
ENV JAVA_MEMORY_MAX=512m
|
||||
ENV JAVA_HOME="/usr/lib/jvm/java-${java.majorVersion}-openjdk-amd64"
|
||||
@@ -12,12 +9,23 @@ ENV CATALINA_HOME="/usr/share/tomcat${tomcat.majorVersion}"
|
||||
ENV CATALINA_BASE="/var/lib/tomcat${tomcat.majorVersion}"
|
||||
ENV CATALINA_OPTS=
|
||||
|
||||
# Install the latest Apache Tomcat and its Java dependencies
|
||||
RUN apt update && apt -y install curl && \
|
||||
apt -y install openjdk-${java.majorVersion}-jdk-headless && \
|
||||
apt -y install openjdk-${java.majorVersion}-jre-dcevm && \
|
||||
apt -y install tomcat${tomcat.majorVersion} && \
|
||||
cd /var/lib/tomcat${tomcat.majorVersion}/lib && \
|
||||
curl -OL https://github.com/HotswapProjects/HotswapAgent/releases/download/RELEASE-${hotswap.version}/hotswap-agent-${hotswap.version}.jar
|
||||
|
||||
# Add our Docker container initialization script
|
||||
ADD docker-entrypoint.sh /usr/local/bin
|
||||
|
||||
# This will give us dynamic injection points into the running webapps
|
||||
# Add our Apache Tomcat configuration
|
||||
# This gives us dynamic injection points into the running webapps
|
||||
COPY tomcat-context.xml /etc/tomcat${tomcat.majorVersion}/context.xml
|
||||
COPY hotswap-agent.properties /var/lib/tomcat${tomcat.majorVersion}/lib
|
||||
|
||||
# We need to create all possible mapped directories
|
||||
# Add directories for dynamic injection points
|
||||
RUN cd /var/lib/tomcat${tomcat.majorVersion} && \
|
||||
rm -rf webapps/ROOT* && \
|
||||
mkdir dev && cd dev && \
|
||||
@@ -25,8 +33,17 @@ RUN cd /var/lib/tomcat${tomcat.majorVersion} && \
|
||||
mkdir lib lib-extra1 lib-extra2 lib-extra3 lib-extra4 lib-extra5 lib-extra6 lib-extra7 && \
|
||||
mkdir web web-extra1 web-extra2 web-extra3 web-extra4 web-extra5 web-extra6 web-extra7
|
||||
|
||||
# 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/share/tomcat${tomcat.majorVersion}/bin/catalina.sh", "run" ]
|
||||
|
Reference in New Issue
Block a user