added hotswap plugin disable parameterization
This commit is contained in:
@@ -9,6 +9,7 @@ ENV JRE_HOME=/usr/local/lib/jvm/java-openjdk-dcevm
|
||||
ENV JAVA_OPTS=
|
||||
ENV ENABLE_HOTSWAP=true
|
||||
ENV ENABLE_JDWP=true
|
||||
ENV DISABLE_HOTSWAP_PLUGINS=
|
||||
|
||||
# Install curl
|
||||
RUN apt update && \
|
||||
|
@@ -29,9 +29,10 @@ You may include your own `hotswap-agent.properties` in any of the `classes` fold
|
||||
You can specify the following environment variables when running the container.
|
||||
|
||||
| Environment Variable | Default Value | Description |
|
||||
| -------------------- | ------------- | ----------- |
|
||||
| ------------------------- | ------------- | ----------- |
|
||||
| `JAVA_MEMORY_INIT` | `128m` | The initial and minimum JVM memory. |
|
||||
| `JAVA_MEMORY_MAX` | `512m` | The maximum JVM memory allowed. |
|
||||
| `ENABLE_HOTSWAP` | `true` | Set to `false` to disable the HotSwap agent. |
|
||||
| `DISABLE_HOTSWAP_PLUGINS` | | Provide a comma-delimited list of HotSwap plugins to disable. You can find a list of those plugins here: https://github.com/HotswapProjects/HotswapAgent/tree/master/plugin. The name is only specified in the source, like [*Spring*](https://github.com/HotswapProjects/HotswapAgent/blob/master/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/SpringPlugin.java). |
|
||||
| `ENABLE_JDWP` | `true` | Set to `false` to disable the Java debugger. |
|
||||
| `JAVA_OPTS` | | Set to extend the standard `JAVA_OPTS` environment variable. |
|
||||
|
@@ -45,7 +45,7 @@ webappDir=
|
||||
|
||||
# Comma separated list of disabled plugins
|
||||
# Use plugin name - e.g. Hibernate, Spring, ZK, Hotswapper, AnonymousClassPatch, Tomcat, Logback ....
|
||||
disabledPlugins=
|
||||
disabledPlugins=${hotswap.disabledPlugins}
|
||||
|
||||
# Watch for changed class files on watchResources path and reload class definition in the running application.
|
||||
#
|
||||
|
@@ -3,6 +3,7 @@ JAVA_OPTS="${JAVA_OPTS} -Xms${JAVA_MEMORY_INIT} -Xmx${JAVA_MEMORY_MAX}"
|
||||
|
||||
if [ "${ENABLE_HOTSWAP}" = "true" ]; then
|
||||
JAVA_OPTS="${JAVA_OPTS} -XX:HotswapAgent=external -javaagent:/usr/local/lib/jvm/hotswap-agent.jar"
|
||||
JAVA_OPTS="${JAVA_OPTS} -Dhotswap.disablePlugins=${DISABLE_HOTSWAP_PLUGINS}"
|
||||
fi
|
||||
|
||||
if [ "${ENABLE_JDWP}" = "true" ]; then
|
||||
|
Reference in New Issue
Block a user