LinuxCommandLibrary

docker-save

TLDR

Save image to tar file

$ docker save -o [image.tar] [image]
copy
Save to stdout
$ docker save [image] > [image.tar]
copy
Save with compression
$ docker save [image] | gzip > [image.tar.gz]
copy
Save multiple images
$ docker save -o [images.tar] [image1] [image2]
copy
Save specific tag
$ docker save -o [image.tar] [image]:[tag]
copy

SYNOPSIS

docker save [options] image [image...]

DESCRIPTION

docker save saves one or more images to a tar archive, including all parent layers, tags, and versions. Use docker load to restore.

PARAMETERS

-o, --output file

Write to file instead of stdout.

SEE ALSO

Copied to clipboard