Closed darrylb-github closed 6 years ago
Is there any update on this? I am looking for similar functionality.
I think this is because there is a default execution of docker:build
added to the package
phase, if you name one of your <executions>
with <id>default</id>
then I believe it would be supplying the configuration for the default execution.
Any news on this?
+1
:+1:
+1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
+1
Description
I have two Dockerfiles I want to build as part of mvn docker:build. They are located in a sub dir with a layout like so:
When running
mvn docker:build
I want it to build two images - one for each dockerfile.How to reproduce
Simplified example:
What do you expect
I expect it to build two images (
image1
andimage2
) using the two different dockerfiles (docker/image1/Dockerfile
anddocker/image2/Dockerfile
).What happened instead
Exception caught: Must specify baseImage if dockerDirectory is null
It expects configuration outside of the executions and if I do this for one image and leave the other in the executions, it doesn't execute both - only the one outside executions.
Should this be possible? Any other ways to do this? I can include multiple plugin definitions but maven warns about them being duplicated:
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin com.spotify:docker-maven-plugin
Software: