2025-03-14 21:59:59 -06:00
|
|
|
# docker save
|
|
|
|
|
|
|
|
|
|
> Export Docker images to archive.
|
|
|
|
|
> More information: <https://docs.docker.com/reference/cli/docker/image/save/>.
|
|
|
|
|
|
|
|
|
|
- Save an image by redirecting `stdout` to a tar archive:
|
|
|
|
|
|
|
|
|
|
`docker save {{image}}:{{tag}} > {{path/to/file.tar}}`
|
|
|
|
|
|
|
|
|
|
- Save an image to a tar archive:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`docker save {{[-o|--output]}} {{path/to/file.tar}} {{image}}:{{tag}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Save all tags of the image:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`docker save {{[-o|--output]}} {{path/to/file.tar}} {{image_name}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Cherry-pick particular tags of an image to save:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`docker save {{[-o|--output]}} {{path/to/file.tar}} {{image_name:tag1 image_name:tag2 ...}}`
|