我正在设置一个Dockerfile来运行我的Java应用,但无法弄清楚如何在ENTRYPOINT中正确添加VM参数
COPY artifact/myapp/web/target/myapp.war myapp.war
COPY artifact/myapp/web/target/certs ./certs
## ---this is working
ENTRYPOINT ["java", "-Dspring.profiles.active=local", "-jar", "myapp.jar"]
但是当我为此类信任库添加其他args时,所有选项均无效。
选项1:
ENTRYPOINT ["java", "-Djavax.net.ssl.trustStore=./certs/file.jks", "-Dspring.profiles.active=local", "-jar", "myapp.jar"]
选项2:
ENTRYPOINT ["java", "-Djavax.net.ssl.trustStore=./certs/file.jks -Dspring.profiles.active=local", "-jar", "myapp.jar"]