Skip to content
Advertisement

Save multiple docker images using one command

Currently I am exporting docker images using below command

docker save imageName | gzip > imageName.tar.gz

docker save mysql | gzip > mysql.tar.gz

This command working fine for single image, i have tons of docker images in my local system, want to export. but i don’t know how to export all images which is available in docker images.

Please guide me how can i archive this by single command. which will save all images in current directory respectively ImageNames

Advertisement

Answer

JavaScript

if you need to get all images, you might use something like this (but it might be getting a little too much, so be careful):

JavaScript

EDIT:

in the event you need to save all images on a system in separate files:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement