<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.41.0</version>
<configuration>
<images>
<image>
<name>localhost:5000/firstimage/${project.artifactId}:latest</name>
<build>
<from>eclipse-temurin:11</from>
<assembly>
<name>deployments</name>
<inline>
<id>copy-dependencies</id>
<formats>
<format>dir</format>
</formats>
<fileSets>
<fileSet>
<outputDirectory>dependencies</outputDirectory>
<directory>${project.basedir}/../context/dependencies</directory>
</fileSet>
</fileSets>
</inline>
</assembly>
<cmd>
<shell>jshell</shell>
</cmd>
</build>
</image>
</images>
</configuration>
</plugin>
By default the plugin use the default assembly descriptors to copy the artifacts and dependencies .
The assembly configuration is used to override the default build from the plugin to send all the context
content as it is in /deployments/dependencies
.
The maven command used is docker:build docker:push -Ddocker.build.jib=true
. An example would be :
mvn -e docker:build docker:push -Ddocker.build.jib=true -Dmaven.repo.local=/tmp/artifacts/m2 --global-settings /tmp/kit-cfkvvqjdm89s73c9irb0-351212210/maven/settings.xml -Dmaven.artifact.threads=12 -T 12
✔️
|
Incremental build is validated |