A tar file cannot include itself
See original GitHub issueHere’s my project structure
/base$ ls -al
total 32
drwxrwxr-x 4 arthur arthur 4096 Feb 25 10:46 .
drwxrwxr-x 17 arthur arthur 4096 Feb 24 16:07 ..
-rw-rw-r-- 1 arthur arthur 752 Feb 25 10:46 Dockerfile
drwxrwxr-x 8 arthur arthur 4096 Feb 25 10:46 .git
-rw-rw-r-- 1 arthur arthur 8 Jan 22 15:00 .gitignore
-rw-rw-r-- 1 arthur arthur 1924 Feb 25 10:46 pom.xml
-rw-rw-r-- 1 arthur arthur 53 Jan 22 15:00 Readme.md
drwxrwxr-x 4 arthur arthur 4096 Feb 25 10:39 target
and the pom file has
<plugin>
<groupId>io.fabio8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.14.0</version>
<configuration>
<registry>myregistry.com</registry>
<images>
<image>
<alias>base</alias>
<name>base:${project.version}</name>
<build>
<assembly>
<dockerFileDir>${project.basedir}</dockerFileDir>
</assembly>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>docker</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<execution>
<id>registry</id>
<phase>deploy</phase>
<goals>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
the same setup works in 0.13.9 but get this starting 0.14.0
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.14.0:build (docker) on project nodejs: Execution docker of goal io.fabric8:docker-maven-plugin:0.14.0:build failed: A tar file cannot include itself. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.fabric8:docker-maven-plugin:0.14.0:build (docker) on project nodejs: Execution docker of goal io.fabric8:docker-maven-plugin:0.14.0:build failed: A tar file cannot include itself.
thanks.
Issue Analytics
- State:
- Created 8 years ago
- Comments:13
Top Results From Across the Web
How to fix - Execution build and start of goal io.fabric8:docker ...
How to fix- Execution build and start of goal io.fabric8:docker-maven-plugin:0.20.0:build failed: A tar file cannot include itself.
Read more >Error creating assembly archive null: A tar file cannot include ...
I looked at this question How to prevent 'Error creating assembly archive distribution: A zip file cannot include itself' that's similar and I...
Read more >Build Docker Images with Maven and Gradle
... because this plugin uses target/docker to generate the build and if you try to build it you'll get next exception: tar file...
Read more >Tar: How to ignore the archive itself - backup - Super User
Try tar cvfz backup.tar.gz *. This way shell extends the *, vs the tar reading current directory. The difference is that the produced ......
Read more >The Destination Directory Cannot Include Itself - ADocLib
A tar file cannot include itself #397 The reason could be the update of the Maven assembly plugin to the newest version 2.6...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, forgot that there is already support for a .maven-dockerignore which can contain ant style patterns for excluding directories.
So adding a
.maven-dockerignore
with the contentwill avoid the inclusion of the target directory.
Does this work for you ?
it works! thanks. btw,
target/docker/**
works too.