Answer the question
In order to leave comments, you need to log in
How to properly run a java application with Jetty and Mysql in docker?
There is a java web application that is packaged in a war file.
The application is launched via jetty. It also works with mysql database.
I need to build a container that would run my web application.
There are two ways:
1. Spool mysql and jetty docker image and run via docker-compose up.
2. Create your own image, which would install mysql, jetty inside itself and run the war file.
Question: which way is correct and why?
Answer the question
In order to leave comments, you need to log in
If possible, it is better to separate jetty and MySQL into different hosts/instances.
In general, it is not recommended to keep them in one image.
But it depends on the problem you are solving.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question