Docker best practices... and us?

Hello folks,

I’ve seen this video from Devoxx (in French, but easy to understand as this is just live coding with big caracters :slight_smile: ) Dockerfile - Les bonnes pratiques (Guillaume Lours et Jérémie Drouet)

While many things we already know are inside (one service per container, isolate networks, use existing community images…), I noticed some really interesting details, that I share here:

  • Dig into mvn dependencies:offline, seen at 17:50
  • Dig into java -xf to explode the jar and limit Docker cache invalidation (not understood all details)
  • Dig into multi-stage build (FROM foo AS bar FROM foo2COPY FROM bar). As far as I understand, this could avoid us the creation of intermediate docker images, but is it the only benefit?

@fabrice @koj or anyone else, I’m really interested in your understanding / feedback on these points / the video.

Thank you :sun_with_face: