Tag Archives: docker load Error processing tar file

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

in use

$ docker load [image].tar

When the command uploads the docker image, an error is reported:

Load an image from a tar archive or STDIN

Add parameter – I

$ docker load -i [image].tar

Still report error:

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

Solution reference: https://stackoverflow.com/questions/40622162/docker-load-and-save-archive-tar-invalid-tar-header

reason:

Running docker save and docker load in different operating systems will cause this problem. Even on different physical machines, the same operating system may also appear.

Solution:

add the parameter – O when the docker is saved. Refer to the official website https://docs.docker.com/engine/reference/commandline/save/

Run on the machine where you want to save the. Tar image:

docker save -o [image].tar

Run on the machine that needs to be uploaded:

docker load -i [image].tar