如何在Dockerfile中将信任库指定为ENTRYPOINT的参数

时间:2019-06-17 19:02:17

标签: java docker docker-entrypoint

我正在设置一个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"]

0 个答案:

没有答案