NAME 名称

podman-save - Save image(s) to an archive
podman-save - 将镜像保存到存档中

SYNOPSIS 概要

podman save [options] name[:tag]
podman save [选项] 名称[:标签]

podman image save [options] name[:tag]
podman image save [选项] 名称[:标签]

DESCRIPTION 描述

podman save saves an image to a local file or directory. podman save writes to STDOUT by default and can be redirected to a file using the output flag. The quiet flag suppresses the output when set. podman save saves parent layers of the image(s) and the image(s) can be loaded using podman load. To export the containers, use the podman export. Note: : is a restricted character and cannot be part of the file name.
podman save 将镜像保存到本地文件或目录。podman save 默认写入 STDOUT,并可使用输出标志将其重定向到文件。设置安静标志时,将抑制输出。podman save 保存镜像的父层和镜像可以使用 podman load 加载。要导出容器,请使用 podman export。注意: : 是受限字符,不能作为文件名的一部分。

podman [GLOBAL OPTIONS] podman [全局选项]

podman save [GLOBAL OPTIONS]
podman save [全局选项]

podman save [OPTIONS] NAME[:TAG]
podman save [选项] 名称[:标签]

OPTIONS 选项

--compress --压缩

Compress tarball image layers when pushing to a directory using the ‘dir’ transport. (default is same compression type, compressed or uncompressed, as source)
在使用“dir”传输时,将 tarball 图像层压缩以推送到目录中。(默认与源相同的压缩类型,压缩或未压缩)

Note: This flag can only be set with --format=docker-dir.
注意:此标志只能与 --format=docker-dir 一起设置。

--format=format

An image format to produce, one of:
要生成的镜像格式之一:

Format

Description

docker-archive

A tar archive interoperable with docker load(1) (the default)
与 docker load(1) 兼容的 tar 存档(默认)。

oci-archive

A tar archive using the OCI Image Format
使用 OCI 图像格式的 tar 存档

oci-dir

A directory using the OCI Image Format
使用 OCI 图像格式的目录

docker-dir

dir transport (see containers-transports(5)) with v2s2 manifest type
具有 v2s2 manifest 类型的 dir 传输(参见 containers-transports(5))

--help, -h --help,-h ¶

Print usage statement 打印使用说明

--multi-image-archive, -m
--多图像存档, -m ¶

Allow for creating archives with more than one image. Additional names are interpreted as images instead of tags. Only supported for --format=docker-archive. The default for this option can be modified via the multi_image_archive="true"|"false" flag in containers.conf.
允许创建包含多个图像的存档。附加名称被解释为图像而不是标签。仅支持 --format=docker-archive。此选项的默认值可以通过 containers.conf 中的 multi_image_archive="true"|"false" 标志进行修改。

--output, -o=file --输出, -o=文件 ¶

Write to a file, default is STDOUT
写入文件,默认为标准输出

--quiet, -q

Suppress the output 抑制输出

--uncompressed --未压缩 ¶

Accept uncompressed layers when using one of the OCI formats.
在使用 OCI 格式之一时接受未压缩的层。

EXAMPLES 示例

Save image to a local file without displaying progress.
将镜像保存到本地文件而不显示进度。

$ podman save --quiet -o alpine.tar alpine:2.6

Save image to stdout and redirect content via shell.
将图像保存到标准输出并通过 shell 重定向内容。

$ podman save alpine > alpine-all.tar

Save image in oci-archive format to the local file.
将图像保存为 oci-archive 格式到本地文件。

$ podman save -o oci-alpine.tar --format oci-archive alpine

Save image compressed in docker-dir format.
将图像以 docker-dir 格式压缩保存。

$ podman save --compress --format docker-dir -o alp-dir alpine
Getting image source signatures
Copying blob sha256:2fdfe1cd78c20d05774f0919be19bc1a3e4729bce219968e4188e7e0f1af679d
 1.97 MB / 1.97 MB [========================================================] 0s
Copying config sha256:501d1a8f0487e93128df34ea349795bc324d5e0c0d5112e08386a9dfaff620be
 584 B / 584 B [============================================================] 0s
Writing manifest to image destination
Storing signatures

SEE ALSO 参见 ¶

podman(1), podman-load(1), containers.conf(5), containers-transports(5)

HISTORY 历史 ¶

July 2017, Originally compiled by Urvashi Mohnani umohnani@redhat.com
2017 年 7 月,最初由 Urvashi Mohnani umohnani@redhat.com 编写