Now, we will configure our pom.xml to be able to generate our Docker image. The first thing we need to change is our final name artifact because Docker images do not allow the - character, then we need to configure properly.
The configuration is pretty simple, put the <finalName> tag on the <build> node. Let's do that:
<build> <finalName>tracked_hashtag</finalName> ....</build>
Good. We have configured the final name properly to generate the Docker image correctly. Now, we will configure the Maven Docker plugin to generate the Docker image by the Maven goal.
In the plugins section inside the build node, we should put in the following plugin configuration:
<plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin ...