Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Using Docker to Develop, Test and Run Maven Pro...

Avatar for Wouter Danes Wouter Danes
November 05, 2014

Using Docker to Develop, Test and Run Maven Project

My Talk on JFall 2014 (Netherlands) on using docker for development and testing.

Avatar for Wouter Danes

Wouter Danes

November 05, 2014
Tweet

More Decks by Wouter Danes

Other Decks in Programming

Transcript

  1. Agenda • What is docker? • Ways I use Docker

    for Development • Using Docker to Scale CI • Integrating Docker in your Build Process • Demo app • Wouldn’t it be great if..
  2. Using Docker to Scale CI • Spawn build slaves •

    No port collisions • Master only development • No version / stack collisions in “environment”
  3. build test package test package publish build run start stop

    link expose tag push Docker commands per build step
  4. build test package test package publish build run start stop

    link expose tag push resources compile test package integration- test verify install deploy Maven vs Docker
  5. Docker Maven Plugin Zoo • 12 github projects • Varying

    focus, some better than others • pick the one that best fits your purpose • Some interesting ones: – wouterd/docker-maven-plugin – rhuss/docker-maven-plugin – spotify/docker-maven-plugin – rhuss/docker-maven-plugin
  6. What should a maven plugin do? • Build docker images

    • Start containers • Link containers • Wait for containers to finish initialisation • Expose URLs / port info to integration tests • Clean up • Push images to an index / registry
  7. Wouldn’t It Be Great If.. • Every team would publish

    – Application images – Application test images – Something describing their dependencies – Or maybe an image that builds their environment?
  8. Wouldn’t It Be Great If.. • Every team would publish

    – Application images – Application test images – Something describing or creating their dependencies • And then you could: – Auto-test against new dependencies? – Auto-test dependants vs your new version?