-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrapper for podman pull? #104
Comments
I did find images.pull, but it doesn't seem to work: self.client.images.pull('docker.io/vanessa/salad')
podman works locally on my host, however (I really like the interface!) podman pull vanessa/salad
? Please select an image:
▸ docker.io/vanessa/salad:latest
quay.io/vanessa/salad:latest |
Got details on the underlying OS error? Did you enable the socket? I've found that the first time I try to connect to the socket, it times out (like the newly spun-up podman process on the other end isn't fully "awake" yet). However, that seems to be a one-time thing and future requests work well. |
@vsoch Pulling images is supported via podman-py. From the integration test that is run before each PR merge: with self.subTest("Pull Alpine Image"):
image = self.client.images.pull("quay.io/libpod/alpine", tag="latest")
self.assertIsInstance(image, Image)
self.assertIn("quay.io/libpod/alpine:latest", image.tags)
self.assertTrue(self.client.images.exists(image.id)) Please check your user journal for errors. Thanks. |
I wound up just implementing a Docker controller (very simple with subprocess) that podman inherits: https://github.com/singularityhub/singularity-hpc/blob/main/shpc/main/container/podman.py. I wonder if the issue is that I wasn't doing the operation under that context - if the podman client really only works under that context, it could be error prone for users that expect This is no longer an issue so happy to close! |
I'm interested in a python client for podman that is more of a wrapper, e.g., allows me to pull a container from Python. Is this something that this library could support? From what I can see, it looks like the client here is intended to interact with the local socket (e.g., I can get containers / manifests that I've already pulled). It's fairly simple to use subprocess to interact with podman directly, but it would be great if the support was provided here! And if it's not and is not planned to, is there a reason why?
The text was updated successfully, but these errors were encountered: