podman ====== .. py:module:: podman .. autoapi-nested-parse:: Provides utilities and wrappers for creating and manipulating images and containers using the 'podman' utility. Module Contents --------------- .. py:function:: podman(*args, log=True, check=True, **kwargs) A simple wrapper for the podman(1) CLI, passing python arguments as shell arguments. .. py:class:: Containerfile(contents='') .. py:attribute:: contents :value: '' .. py:method:: add_ssh_pubkey(key, user='root') .. py:method:: write_to(path) .. py:class:: Registry(name='contest-registry', host_addr='127.0.0.1') Local podman registry as a class (instance). with Registry() as reg: # pull docker.io/foobar, push it to the local registry local_image = reg.push('docker.io/foobar') # push a locally-built image foobar to the local registry local_image = reg.push('foobar') # local_image is ie. '127.0.0.1:12345/foobar' ... .. py:attribute:: name :value: 'contest-registry' .. py:attribute:: addr :value: '127.0.0.1' .. py:attribute:: proc :value: None .. py:attribute:: tagged .. py:method:: start() .. py:method:: stop() .. py:method:: get_listen_addr() Returns an (address, port) tuple the started-up registry is listening on. .. py:method:: push(image) Given an image name/url, tag that image with a local registry addr:port and push to the local started-up registry. Returns image path on the local registry.