Reputation: 363
I have spring boot docker image. I provided all arguments(environment variables) in application.properties file. How to provide this file while running the application through docker image as input.
Please help me.
Upvotes: 1
Views: 9038
Reputation: 2749
You can use docker volumes and start your spring boot application within the docker image like
java -jar /path/to/volume/yourapp.jar --spring.config.location=file:/path/to/volume/application.properties
The application.properties
is then externalized to the folder the volume is associated to.
Upvotes: 7