-
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
Support podman version --format '{{ json . }}'
for docker compatibility
#2671
Comments
`podman` is an almost-CLI-compatible replacement for `docker`, which allows unprivileged users to run containers, with no daemon. On some systems, `docker` is a symbolic link to `podman`. I say "almost" because one command that is not compatible is `docker version --format '{{ json . }}'`, used by Karton to detect whether docker is present and usable. containers/podman#2671 To work around this, if _try_docker() fails, but running `podman version` succeeds, use `podman` instead. Otherwise, behave as before.
on most of our comments where format is offered, you can pass --format json ... not the absence of go templating. |
I don't know how much sense mimicing |
Can't we support |
If you remove the json it works. |
yeah this can be done I think ... @rhatdan if you want me to kick this out, assign this to me and I'll assume that means you want it done. |
@baude IMO if we do this, we add the .json Go template, but we don't try
and match the Docker JSON output, we just output the JSON we normally would
for version.
…On Sun, Mar 17, 2019, 08:49 Brent Baude ***@***.***> wrote:
yeah this can be done I think ... @rhatdan <https://github.com/rhatdan>
if you want me to kick this out, assign this to me and I'll assume that
means you want it done.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2671 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHYHCIZR5hnqoJ2_gwKFfaN5gmSwgJIFks5vXlYLgaJpZM4b2zz3>
.
|
FWIW Karton, the tool I was trying to use with |
@mheon agree but again, if it is no help due to the keys, then ... |
I understand that the keys don't make sense for Podman; I guess there comes a point where it cannot be an absolutely 100% CLI-compatible drop-in replacement for Docker. I wrote a small patch to make |
Well we can only go so far before it starts lying. Podman is not a client/server application, so adding these fields makes no sense. |
for podman version, we now support a GO template for json output. fixes containers#2671 Signed-off-by: baude <[email protected]>
`podman` is an almost-CLI-compatible replacement for `docker`, which allows unprivileged users to run containers, with no daemon. On some systems, `docker` is a symbolic link to `podman`. I say "almost" because one command that is not compatible is `docker version --format '{{ json . }}'`, used by Karton to detect whether docker is present and usable. containers/podman#2671 To work around this, if _try_docker() fails, but running `podman version` succeeds, use `podman` instead. Otherwise, behave as before.
`podman` is an almost-CLI-compatible replacement for `docker`, which allows unprivileged users to run containers, with no daemon. On some systems, `docker` is a symbolic link to `podman`. I say "almost" because one command that is not compatible is `docker version --format '{{ json . }}'`, used by Karton to detect whether docker is present and usable. containers/podman#2671 To work around this, if _try_docker() fails, but running `podman version` succeeds, use `podman` instead. Otherwise, behave as before.
When run in remote mode, it does show that data, but not in local mode.
|
/kind feature
Description
I tried to use Karton (which uses the
docker
CLI) withdocker
as a symlink topodman
. I failed at the first hurdle because it tries to rundocker version --format '{{ json . }}'
, which fails:podman version --format json
works, but produces output like this:Whereas according to the Docker documentation, Docker produces differently-formatted output:
I'm calling this a feature request, but depending on the policy on
docker
CLI compatibility, maybe it's a bug. (Arguably I should just teach Karton aboutpodman
.)Steps to reproduce the issue:
podman version --format '{{json .}}'
Describe the results you received:
Describe the results you expected:
Output of the same shape as
docker version --format '{{json .}}'
.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Additional environment details (AWS, VirtualBox, physical, etc.):
I'm using the development branch of Endless OS, which as of 24 hours ago include
podman
.The text was updated successfully, but these errors were encountered: