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.

red5pider
  • 351
  • 1
  • 9
  • 24

1 Answers1

0

There is an existing API that can be used like this.

c = podman.Client(uri='unix://var/run/docker.sock')
with c._client() as podman:
    results = podman.LoadImage("", "/tmp/se.tgz", False, False)
red5pider
  • 351
  • 1
  • 9
  • 24