Docker Community Forums

Share and learn in the Docker community.

Invalid tar header on Docker load


(Dionachris) #1

Hi there,

I’m trying to figure out why I can’t import an image into docker on Amazon Linux which was created on a Mac.

The error I’m receiving is;

[ec2-user@ip-172-31-33-180 ~]$ docker load --input=./DMServerDockerImage.tar
Untar re-exec error: exit status 1: output: archive/tar: invalid tar header

I know the image is good as it’s working on my Windows machine via Docker Toolbox - and I’ve compared checksums to ensure the files on the Linux instance are identical to on the Mac and Windows.

The only difference I can see is that the Mac is using 1.10 and the AWS Linux instance has 1.11 installed.

Could this be the problem, or is there something else I need to do?

Thanks,

Chris


(Stuqza) #2

I meet the same error on my windows10.
I just typed:

  • docker export > ubuntu16.04.tar
  • docker container prune
  • docker image rm
  • docker import ubuntu16.04.tar test/ubuntu:v1.0

and it shows: error processing tar file(exit status 1): archive/tar: invalid tar header


(Yunhong) #3

I meet the same error on my windows10, in powershell, when use:

docker save image > tmp.tar
docker load < tmp.tar

then I tryed:

docker save image -o tmp.tar
docker load -i tmp.tar

no error anymore.