我从下面的答案https://stackoverflow.com/a/35108974/7809534得到了JVM参数的列表
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false我想把他们安排在码头上。
这就是我试过的:
environment:
- JAVA_TOOL_OPTIONS="-Dcom.sun.management.jmxremote"
- JAVA_TOOL_OPTIONS="-Dcom.sun.management.jmxremote.port=9010"
- JAVA_TOOL_OPTIONS="-Dcom.sun.management.jmxremote.local.only=false"
- JAVA_TOOL_OPTIONS="-Dcom.sun.management.jmxremote.authenticate=false"
- JAVA_TOOL_OPTIONS="-Dcom.sun.management.jmxremote.ssl=false"但这是行不通的。
我该怎么做呢?
发布于 2022-02-17 09:14:20
最后,我设法找到了解决办法。
下面是:
environment:
- JAVA_TOOL_OPTIONS=
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false发布于 2022-02-16 16:33:40
使用YAML多行字符串操作符lines >‘>将行合并
environment:
JAVA_TOOL_OPTIONS: >
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=falsehttps://stackoverflow.com/questions/71145214
复制相似问题