Open OndraZizka opened 1 year ago
I've also posted a StackOverflow question in case it's me using it wrongly: https://stackoverflow.com/questions/73933182/fabric8-docker-maven-plugin-dockertag-fails-with-cannot-invoke-buildimageconf
Yes, it could be that a mvn docker:tag
iterates over all image configurations and fails if a build section is missing (which is the case for your mongo DB image). If so, this is a bug.
Happy to take any help for fixing this.
As alternative you might consider to leverage the <tags>
option in the build configuration for tagging, instead of docker:tag.
Description
I'm trying to create a docker tagged image with Docker Maven Pugin.
The build goal works, but when trying to tag the image, DMP fails:
Execution start of goal io.fabric8:docker-maven-plugin:0.40.2:tag failed: Cannot invoke "io.fabric8.maven.docker.config.BuildImageConfiguration.cleanupMode()" because "buildConfig" is null
Same if I try with
mvn docker:tag
:Execution default-cli of goal io.fabric8:docker-maven-plugin:0.40.2:tag failed: Cannot invoke "io.fabric8.maven.docker.config.BuildImageConfiguration.cleanupMode()" because "buildConfig" is null
The build of the image happens before that:
I have tried to search for what buildConfig. I assume it is a model for the
<build>
section of the respective image. But that one works forbuild
.Info
docker-maven-plugin version : 0.40.2 (latest 2022-09)
Maven version (
mvn -v
) :Docker version : v20.10.17
If it's a bug, how to reproduce : Use the docker:tag goal.
Sample POM: