0

I'm trying to load my tar image in podman.

Python 3.7.8 (default, Jun 29 2020, 05:46:05)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import podman
>>> c = podman.Client(uri='unix://var/run/docker.sock') #docker.sock is my mount point for podman socket
>>> c.
c.containers  c.images      c.pods        c.system
>>> c.images.
c.images.build(          c.images.get(            c.images.list(           c.images.search(
c.images.delete_unused(  c.images.import_image(   c.images.pull(
>>> c.images.

I don't see any load image method. Is there any method like c.load_image("/tmp/se.tgz")? similar method exists for docker and easily doable.

4

1 回答 1

0

有一个现有的 API 可以像这样使用。

c = podman.Client(uri='unix://var/run/docker.sock')
with c._client() as podman:
    results = podman.LoadImage("", "/tmp/se.tgz", False, False)
于 2020-08-27T15:36:01.370 回答