-
Notifications
You must be signed in to change notification settings - Fork 522
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
Compatibility with Podman 4.x #3812
Comments
Podman 4.4 might fix this. I will test when I get the chance. |
I'm going to dupe this to #3241. Podman's CLI is incompatible with Docker's in a few ways, enough that it's not sufficient to just change |
@bwateratmsft thanks. It sounds like Podman 4.4 might help based on this comment |
TBH I'd have preferred Podman keep its format as-is, since it's actually syntactically correct JSON. Parsing the output from the Docker CLI is made much harder by all the deviation it does 😕 (e.g. one-object-per-line instead of an array, labels and similar things being smushed down into a string instead of a nested object, etc.) |
Yeah, I was kind of surprised by the Docker output TBH. Podman's makes much more sense, though I guess it'd be unlikely Docker will change their format at this stage. |
I was confused by the Docker output as well, but the description of the associated Podman PR makes the line-delimited Docker output seem sensible. i.e. the difference between "give me the results in JSON format" vs "format each result as JSON". |
True. A command using |
I've been trying to use this extension with Podman 4.3.1, but it seems incompatible. I can successfully use the Podman socket on my MacBook by setting
DOCKER_HOST=unix:///Users/$USER/.local/share/containers/podman/machine/podman-machine-default/podman.sock
and using the Docker CLI. However the extension shows no output as I set
"docker.dockerPath": "/opt/podman/bin/podman"
to use the Podman CLI.I debugged the
listImages()
function, and narrowed the issue down. It seems like the Docker CLI outputs entries as line by line JSON objects, whereas Podman outputs an array of objects and results in a parsing error (in this function). I've included sample output from both at the bottom of this issue.This might not be an issue for consideration for this plugin, since it's designed around Docker and perhaps Podman should match the Docker output.
Interestingly enough, using cURL to interact with the API (i.e
curl --unix-socket /var/run/docker.sock 'http://localhost/images/json'
andcurl --unix-socket /Users/$USER/.local/share/containers/podman/machine/podman-machine-default/podman.sock 'http://localhost/images/json'
) of Podman/Docker produces more closely aligned output, though Podman's output is a tad more verbose.Docker
Podman
The text was updated successfully, but these errors were encountered: