• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

A couple of questions about docker and spring boot.

 
Bartender
Posts: 1146
38
IBM DB2 Netbeans IDE Spring Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a couple of question about usage of docker with Spring Boot.
First: following Spring official tutorials, I've seen how to build a docker image: you start from a JDK image, copy (using docker file syntax) the uber-jar into the container, and then tell docker how to run a java -jar myfatjar.jar command.
Besides this 'classical' approach, I've also seen someone following this approach: he pulls a docker image of a given JDK, and uses it as a "virtual" JDK to run an uberjar regularly located on host file system.
This approaches seems to be easier - you have just to copy your uberjar in a regular file-system, but I wonder if it may have some drawbacks.
Second question: what about memory usage ? Even with a small boot application, the memory footprint seems important - a small 'hello-world' REST application requires +120MB of memory. Do you have any advice to reduce spring boot footprint ?
Thanks in advance.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!