Here is a plugin defintion:
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.26.0</version>
<configuration>
<registry>000000000000.dkr.ecr.us-east-1.amazonaws.com/my-aws-registy-0000000000000:latest</registry>
<images>
<image>
<name>my-image</name>
<build>
<tags>
<tag>000000000000.dkr.ecr.us-east-1.amazonaws.com/my-aws-registy-0000000000000:latest</tag>
</tags>
<dockerFileDir>${project.build.directory}</dockerFileDir>
</build>
</image>
</images>
</configuration>
</plugin>
After resource phase Dockerfile
is copied to target
. When I try to invoke docker:build
goal I got:
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.25.2:build (default-cli)
on project my-project: Execution default-cli of goal
io.fabric8:docker-maven-plugin:0.25.2:build failed: A tar file cannot include itself. -> [Help 1]
What I want - just simple execute docker build -t .
command via maven without any plugin packaging/building/assembly goals (or subgoals).
Yesp this plugin have a lot of possibilities, but I need just docker build without any tar
archiving and this have to be done from target
folder.
How to do that???