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:
- Configure the plugin
- Push the Docker image
- Configure the Docker Spring profile
Then, it is show time. Let's go.