How to do "docker load" for multiple tar files

First I attempted to use the glob expression approach you first described:

# download some images to play with
docker pull alpine
docker pull nginx:alpine

# stream the images to disk as tarballs
docker save alpine > alpine.tar
docker save nginx:alpine > nginx.tar

# delete the images so we can attempt to load them from scratch
docker rmi alpine nginx:alpine

# issue the load command to try and load all images at once
cat *.tar | docker load

Unfortunately this only resulted in alpine.tar being loaded. It was my (presumably faulty) understanding that the glob expression would be expanded and ultimately cause the docker load command to be run for every file into which the glob expression expanded.

Therefore, one has to use a shell for loop to load all tarballs sequentially:

for f in *.tar; do
    cat $f | docker load
done

Use the script described in save-load-docker-images.sh to save or load the images. For your case it would be

./save-load-docker-images.sh load -d <directory-location>

Using xargs:

ls -1 *.tar | xargs --no-run-if-empty -L 1 docker load -i

(A previous revision left off the -i flag to "docker load".)