Skip to content

Add podman save --zip/-O #28420

@MatthewFletcher

Description

@MatthewFletcher

Feature request description

Currently, in order to do podman save to a .tar.gz file, the user must do podman save image:tag | gzip > out.tar.gz.
Furthermore, output files must be manually named.

Suggest potential solution

Working on a pull request, but the idea is to add a --zip flag to save that creates the zipped tarball in one step.
Furthermore, taking a page from curl's flags, using --zip -O (uppercase O) would create the filename automatically.

$ podman save image:tag --zip > out.tar.gz
$ ls
out.tar.gz
$ podman save my-image:tag --zip -O 
$ ls 
my-image_tag.tar.gz

Have you considered any alternatives?

While piping to gzip is an acceptable solution, podman makes you create each image name. Especially with the -O option, this would allow for file names to be automatically and consistently generated.

Additional context

A lot of my job requires copying docker images to an airgap network, so I do a lot of podman save commands. Hence the inspiration for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions