以下の内容はhttps://uga-box.hatenablog.com/entry/2020/10/19/000000より取得しました。


【Jib】 コンテナ起動時にコマンドライン引数を指定したい

Spring Boot起動時に環境毎にapplication.propertiesを切り替える場合、コマンドライン引数を以下のようにしている

java -jar spring-boot-application-properties-sample-1.0.0.jar --spring.profiles.active=dev1

これをjibで固めたコンテナの起動時に指定できるようにしたい

mavenコマンドでイメージを作成する際に-Djib.container.argsをつけるとよい

$ ./mvn clean compile jib:build -Dimage=myimage -Djib.container.args=--spring.profiles.active=dev1

github.com

参考

uga-box.hatenablog.com

https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config-yaml-shortcomings

https://qiita.com/NagaokaKenichi/items/fd9b5e698776fe9b9cc4




以上の内容はhttps://uga-box.hatenablog.com/entry/2020/10/19/000000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14