Minimal podman-py code that starts a container

#!/usr/bin/env python3

import json
from podman import PodmanClient

with PodmanClient(base_url="unix:///run/podman/podman.sock") as client:
    #image = client.images.pull('nginx')
    mounts = [ {"type": "bind", "source":"/home/opc", "target": "/home/opc", "read_only": False}]
    client.containers.run('nginx', name="nginx", detach=True, privileged=True, mounts=mounts)

Comments

Popular posts from this blog

Using PlayStation 1 Densha de Go controller on emulators

Using PS1/PC Densha de Go! controller SLPH-00051/TCPP-20001/DGOC-44U on PS4/Switch Densha de Go!!

Play octoshape stream on windows with VLC player