Docker API: Error processing tar file(exit status 1): archive/tar: invalid tar header

700 Views Asked by At

I want to upload a zip file to my tomcat container using docker API.

http://{mydockerHost}:2375/containers/{containerId}/archive?path=/usr/local/tomcat/

But this i am getting this kind of expection,

{
    "message": "Error processing tar file(exit status 1): archive/tar: invalid tar header"
}

Kindly solve my problem, Thanks in advance

1

There are 1 best solutions below

0
On

seem you need to download manually the specific docker image file then:

// 1- extract file

// 2- then run this command in its folder

// in my case neo4j docker image

use this:

docker load -i .\neo4j

instead of this

docker load -i .\neo4j.7z

// Error processing tar file(exit status 1): archive/tar: invalid tar header