Using the following plugin
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.33</version
and using the following configuration (Just posting the relevant bits here)
<configuration>
<verbose>build</verbose>
<images>
<image>
<name>${container.imageNameWithTag}</name>
<build>
<labels>
<dummy.label>dummyLabelValue</dummy.label>
</labels>
<contextDir>${project.basedir}/src/main/docker</contextDir>
<assembly>some required assembly </assembly>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>docker-build</id>
<goals>
<goal>build</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
But the final image has only these labels
"Labels": {
"org.label-schema.build-date": "20181204",
"org.label-schema.license": "GPLv2",
"org.label-schema.name": "CentOS Base Image",
"org.label-schema.schema-version": "1.0",
"org.label-schema.vendor": "CentOS"
}
which I reckon are from centos
base image, but no dummy.label
Am I missing any configuration, or anything is wrongly configured?
The documentation to the plugin is at Maven Docker Plugin