0

As far as I understand how it works, I see two slightly different methods :

  1. Method 1
  • build a docker image containing all the stuff I need for my java app (the JAR for my app and the various JARs libraries).
  • push the docker image on a repository (dockerhub)
  • give the name of the image to marathon (using “docker” : {“image”: name_of_my_image}))

but the main drawback of is that I have to build/push a new image every time I make a modification to my application code

  1. Method 2
  • build a docker image containing only the JARs that my application depends on (but without the JAR of my application)
  • push this image on a repository
  • put the JAR of my app on a web server
  • give the name of the image to marathon and indicate the uris pointing to my web server to marathon
  • ask marathon to use my image

every time I need to modify my image, I just have to push it on the web server.

Is the second method the correct way ? or does it exist other better approaches ?

  • 2
    I believe this is really opinion-based. Which is not really the place for it – AxelH Dec 14 '16 at 12:07
  • 1
    May be there are some pros and cons for each method I am not aware of ... – Jean-Pierre Dec 14 '16 at 12:17
  • If it helps you at all this isn't really specific to marathon and is a general docker image question. Typically you will see images closer to your first method though; a new version of your app = a new docker image. – Dance machine Jan 10 '17 at 00:42

0 Answers0