4.10. Saving and loading images


Use the podman save command to save an image to a container archive. You can restore it later to another container environment or send it to someone else. You can use --format option to specify the archive format. The supported formats are:

  • docker-archive
  • oci-archive
  • oci-dir (directory with oci manifest type)
  • docker-archive (directory with v2s2 manifest type)

The default format is the docker-archive format.

Use the podman load command to load an image from the container image archive into the container storage.

Prerequisites

  • The container-tools meta-package is installed.
  • A pulled image is available on the local system.

Procedure

  1. Save the registry.redhat.io/rhel10/support-tools image as a tarball:

    • In the default docker-archive format:

      $ podman save -o mysupport-tools.tar registry.redhat.io/rhel10/support-tools:latest
    • In the oci-archive format, using the --format option:

      $ podman save -o mysupport-tools-oci.tar --format=oci-archive registry.redhat.io/rhel10/support-tools

      The mysupport-tools.tar and mysupport-tools-oci.tar archives are stored in your current directory. The next steps are performed with the mysupport-tools.tar tarball.

  2. Check the file type of mysupport-tools.tar:

    $ file mysupport-tools.tar
    mysupport-tools.tar: POSIX tar archive
  3. To load the registry.redhat.io/rhel10/support-tools:latest image from the mysupport-tools.tar:

    $ podman load -i mysupport-tools.tar
    ...
    Loaded image(s): registry.redhat.io/rhel10/support-tools:latest

    For more information, see the podman-save(1) and podman-load(1) man pages on your system.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部