Configuring the docker-maven-plugin

There is an excellent Maven plugin provided by fabric8 (https://github.com/fabric8io/docker-maven-plugin). It is licensed under the Apache-2.0 license, which means we can use it without any worries.

We will configure our project to use it, and after image creation, we will push this image on Docker Hub. It is a public Docker registry. 

The steps are:

  1. Configure the plugin
  2. Push the Docker image
  3. Configure the Docker Spring profile

Then, it is show time. Let's go.

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.