-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Bug]: JSON format output is not matching Docker JSON output format #17229
Comments
I should add, I understand this might not be a bug and by design but I didn't see it raised when I did a quick search. |
I have a feeling this might be difficult for us to fix at this point, since we could break users of Podman. @mheon WDYT? |
We can do the Docker-compat HTTP API easily enough. It's a lot harder to justify breaking the CLI version. Might be a good 5.0 breaking change? |
I already fixed this for 4.4, #16446 |
@Luap99 thank you! I didn't spot that when I searched 🎉 |
@Luap99 I tried the 4.4 dev from the latest commit and it still doesn't work for me. Reverting to older docker extension 1.22.2 fixes it. |
@JustinGrote thanks for the reminder on this. I tested too, and found that it didn't work because the keys returned in 4.4 aren't consistent with those from Docker's CLI, e.g |
The older Docker extension version (1.22.x and below) uses the Docker (or in this case, Podman) HTTP daemon for most things. Podman's HTTP daemon more closely matches Docker's, compared to their respective CLIs. With extension version 1.23+, we're exclusively using the CLI to communicate, hence the greater sensitivity to the differences. |
If we output with ID and Id, would it work? |
@evanshortiss any chance you all of the problems? i'm wondering if we could make the plugin tolerant of case sensitivity? |
I don't think any changes to Podman are necessary. We (Docker extension) are working on an abstraction layer to deal gracefully with different container runtimes. |
@bwateratmsft that's awesome! thanks so much! If there is something you need us to do to support you, please just ask. you can also find us on IRC at libera #podman |
@bwateratmsft any update, or is there an issue in the docker extension we could follow (I couldn't find one)? |
@deboer-tim we're tracking it in microsoft/vscode-docker#3241 / microsoft/vscode-docker#3411 |
Issue Description
Output from
docker image ls --format {{json .}}
is line delimited JSON objects, but Podman output is a JSON array. I ran into this trying to use Podman with the VSCode Docker extension (issue microsoft/vscode-docker#3812)Steps to reproduce the issue
Steps to reproduce the issue (I am on macOS, but don't think that matters):
podman pull registry.access.redhat.com/ubi8/openjdk-17:1.14
podman image ls --filter dangling=false --no-trunc --format {{json .}}
DOCKER_HOST=unix:///Users/$USER/.local/share/containers/podman/machine/podman-machine-default/podman.sock docker image ls --filter dangling=false --no-trunc --format {{json .}}
Note the difference in the output format.
Describe the results you received
Output examples for both CLIs are included below:
Docker
Podman
Describe the results you expected
Expected Podman CLI output to match Docker CLI.
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
N/A
Additional information
N/A
The text was updated successfully, but these errors were encountered: