2020-11-10 23:08:14 +03:30
|
|
|
# docker save
|
|
|
|
|
2024-01-25 02:28:11 -03:00
|
|
|
> Export Docker images to archive.
|
2024-09-26 03:21:33 -07:00
|
|
|
> More information: <https://docs.docker.com/reference/cli/docker/image/save/>.
|
2020-11-10 23:08:14 +03:30
|
|
|
|
2024-03-14 02:01:06 -03:00
|
|
|
- Save an image by redirecting `stdout` to a tar archive:
|
2020-11-10 23:08:14 +03:30
|
|
|
|
|
|
|
`docker save {{image}}:{{tag}} > {{path/to/file.tar}}`
|
|
|
|
|
2024-03-14 02:01:06 -03:00
|
|
|
- Save an image to a tar archive:
|
2020-11-10 23:08:14 +03:30
|
|
|
|
|
|
|
`docker save --output {{path/to/file.tar}} {{image}}:{{tag}}`
|
|
|
|
|
|
|
|
- Save all tags of the image:
|
|
|
|
|
|
|
|
`docker save --output {{path/to/file.tar}} {{image_name}}`
|
|
|
|
|
|
|
|
- Cherry-pick particular tags of an image to save:
|
|
|
|
|
|
|
|
`docker save --output {{path/to/file.tar}} {{image_name:tag1 image_name:tag2 ...}}`
|