podman image spec format complains "unterminated quoted string" while docker works #15355
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman image spec format has difference with docker output
Steps to reproduce the issue:
use latest podman and pull any container image like
podman/stable
use
podman inspect
to check anddocker
command to compareDescribe the results you received:
# podman inspect --type=image quay.io/podman/stable -f '{{range $key, $value := .Config.Labels}}{{printf "%s: %s\n" $key $value}}{{end}}' ERRO[0000] Printing inspect output: template: image inspect:1: unterminated quoted string
Describe the results you expected:
same command, it works for docker
$ docker inspect --type=image quay.io/podman/stable -f '{{range $key, $value := .Config.Labels}}{{printf "%s: %s\n" $key $value}}{{end}}' io.buildah.version: 1.26.2 license: MIT name: fedora org.opencontainers.image.created: 2022-08-16T18:21:01+00:00 org.opencontainers.image.revision: 3dace12777e27a7732acb25ae78f86ced8ae04da org.opencontainers.image.source: https://github.com/containers/podman.git org.opencontainers.image.version: 4.1.1 vendor: Fedora Project version: 36
I expect it can keep the same behavior, though I know I can use
$ podman inspect --type=image quay.io/podman/stable -f '{{range $key, $value := .Config.Labels}}{{$key}}: {{$value}}{{println}}{{end}}'
instead, lots of legacy scripts rely on old format.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
I tested earlier version in RHEL8, the result uses image
quay.io/podman/stable:v4.1
The text was updated successfully, but these errors were encountered: