-
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
podman version --json
should include .Client.Platform.Name
#20818
Comments
One caveat however is that very old versions of docker, like 17.04, won't have this key set either. |
Generally speaking version checks are not that great especially considering the RHEL world where also features are backported sometimes. It is much better to actually check for the features you need if possible. It is not clear to me how much |
That ain't a bad idea. I guess I can do: if docker run --help | grep -w -- --quiet; then
supports_quiet=true
else
supports_quiet=false
fi
I would be able to perform different version range comparisons depending on the client.
I see your point, but my intention was to make the transition as transparent as possible. I didn't want to refactor my whole scripts. Also, my scripts are not meant to have first class support for podman.
Exactly. My scripts require docker, but I don't want to reject users if they decide to symlink or shim docker to podman. This is a little worse considering that on RHEL 8 |
All that said, I quite like your idea of checking the features. That's smart. If you don't believe this issue is worth implementing then, please close it. |
Given you seem to have a solution and nobody else has brought up this difference in the meantime I am going to close it and assume it is not really needed in practice |
Issue Description
I am trying to use podman's docker CLI compatibility, but some scripts I have rely on the output of
docker version --json
to decide whether the version of docker is good enough or not.podman version
should include the client name, so that scripts can detect when the client is podmand and decide what to do in such case, like for example, checking the minimum supported version of podman.Steps to reproduce the issue
Describe the results you received
See above.
Describe the results you expected
podman info output
N/A
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: