Using Docker in development for Java EE applications

后端 未结 7 1088
北荒
北荒 2021-02-05 13:59

I will add 300 points as bounty

I have recently started to take a closer look at Docker and how I can use it for faster getting new member of t

7条回答
  •  醉酒成梦
    2021-02-05 14:36

    The way you would normally deploy anything with Docker is by producing a new image atop of the platform base image. This way you follow Docker dependency bundling philosophy.

    In terms of Maven, you can produce a tarball assembly (let's say it's called jars.tar) and then call ADD jars.tar /app/lib in Dockerfile. You might also implement a Maven plugin that generates a Dockerfile as well.

    This is the most sane approach with Docker today, other approaches, such as building image FROM scratch are not quite applicable for Java applications.

    See also Java JVM on Docker/CoreOS.

提交回复
热议问题