Is it good practice to put a war file image in docker containers?

I'm new to docker. I have a Spring-boot application that I want to deploy and run using docker. Is it good practice to place images of military files in a container or is it better to put jars? why?

PS Once I read that it’s better to "make banks, not wars" :-), but I don’t know the reasons for this.

+4
source share
2 answers

One of the main reasons for creating a docker image for your application is to provide an artifact that people can run without installing and managing external software dependencies (for example, an application server to run a war file).

From the point of view of the container user, it does not matter whether you pack your code in a bank or military file or as a fortran binary. All they do is launch a container image.

On your part, building and configuring the Docker, packing the jar file and copying it will be a simpler solution than trying to configure and configure the application server for packaging, and then deploy each version to the application server. See Ohmens Answers for some additional technical components of the java assembly.

+4

Matt , .

  • : tomcat glassfish . () , . , , , . jar, . BTW .
  • :, java , . , jar , , . . , "" , . .
+2

Source: https://habr.com/ru/post/1649512/


All Articles