Skip to content
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 images --format incompatibility with docker (again) #14012

Closed
tartina opened this issue Apr 26, 2022 · 5 comments · Fixed by #14034
Closed

podman images --format incompatibility with docker (again) #14012

tartina opened this issue Apr 26, 2022 · 5 comments · Fixed by #14034
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.

Comments

@tartina
Copy link
Contributor

tartina commented Apr 26, 2022

/kind bug

Description
The tags available in the podman images --format option is incompatible with docker. In particular, docker has both {{.CreatedAt}} and {{.CreatedSince}} while podman has neither but has {{.Created}} instead.

Steps to reproduce the issue:

  1. docker images --format '{{.CreatedAt}}'

  2. podman images --format '{{.CreatedAt}}'

Describe the results you received:
`Error: template: history:1:13: executing "history" at <.CreatedAt>: can't evaluate field CreatedAt in type images.historyReporter

Describe the results you expected:

22 months ago
22 months ago
22 months ago
22 months ago

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Client:       Podman Engine
Version:      4.0.2
API Version:  4.0.2
Go Version:   go1.17.7

Built:      Tue Mar 15 19:15:06 2022
OS/Arch:    linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.24.1
  cgroupControllers: []
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.1.0-1.module_el8.7.0+1106+45480ee0.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: 235fd1687e002bf8eaa7ea2f999104be869858b4'
  cpus: 2
  distribution:
    distribution: '"centos"'
    version: "8"
  eventLogger: file
  hostname: fabric-0-ibsi-dev-ita.inps.it
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 32768
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 32768
  kernel: 4.18.0-383.el8.x86_64
  linkmode: dynamic
  logDriver: k8s-file
  memFree: 1836163072
  memTotal: 3912990720
  networkBackend: cni
  ociRuntime:
    name: runc
    package: runc-1.0.3-3.module_el8.7.0+1106+45480ee0.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.3
      spec: 1.0.2-dev
      go: go1.17.7
      libseccomp: 2.5.2
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_NET_RAW,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.8-2.module_el8.7.0+1106+45480ee0.x86_64
    version: |-
      slirp4netns version 1.1.8
      commit: d361001f495417b880f20329121e3aa431a8f90f
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.2
  swapFree: 8589930496
  swapTotal: 8589930496
  uptime: 3h 50m 23.18s (Approximately 0.12 days)
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
  - docker.io
store:
  configFile: /home/guido/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.8.2-1.module_el8.7.0+1106+45480ee0.x86_64
      Version: |-
        fusermount3 version: 3.3.0
        fuse-overlayfs: version 1.8.2
        FUSE library version 3.3.0
        using FUSE kernel interface version 7.26
  graphRoot: /home/guido/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 4
  runRoot: /run/user/1000
  volumePath: /home/guido/.local/share/containers/storage/volumes
version:
  APIVersion: 4.0.2
  Built: 1647371706
  BuiltTime: Tue Mar 15 19:15:06 2022
  GitCommit: ""
  GoVersion: go1.17.7
  OsArch: linux/amd64
  Version: 4.0.2

Package info (e.g. output of rpm -q podman or apt list podman):

podman-4.0.2-1.module_el8.7.0+1106+45480ee0.x86_64

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)

No

Additional environment details (AWS, VirtualBox, physical, etc.):

See #5110

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 26, 2022
@vrothberg
Copy link
Member

Thanks for reaching out! A pity we regressed again. Let's make sure the fixes are accompanied by regression tests.

@rhatdan
Copy link
Member

rhatdan commented Apr 26, 2022

These are working for me?

$ podman images --format '{{.CreatedAt}}'
2022-04-24 10:52:55 +0000 UTC
2022-04-20 22:29:23 +0000 UTC
2022-02-21 06:48:24 +0000 UTC
2021-06-10 18:55:43 +0000 UTC

$ podman version
Client: Podman Engine
Version: 4.0.3
API Version: 4.0.3
Go Version: go1.18
Built: Fri Apr 1 14:21:54 2022
OS/Arch: linux/amd64

@vrothberg
Copy link
Member

Same here. @tartina, can you double check?

@Luap99
Copy link
Member

Luap99 commented Apr 27, 2022

`Error: template: history:1:13: executing "history" at <.CreatedAt>: can't evaluate field CreatedAt in type images.historyReporter

I think the description is wrong. The error is from podman image history --format ...

@tartina
Copy link
Contributor Author

tartina commented Apr 27, 2022

Both commands fail for me:
podman image history --format='{{.CreatedAt}}'
podman history --format='{{.CreatedAt}}'

The error is:
Error: template: history:1:13: executing "history" at <.CreatedAt>: can't evaluate field CreatedAt in type images.historyReporter

rhatdan added a commit to rhatdan/podman that referenced this issue Apr 27, 2022
Fixes: containers#14012

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
rhatdan added a commit to rhatdan/podman that referenced this issue Apr 27, 2022
Fixes: containers#14012

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
rhatdan added a commit to rhatdan/podman that referenced this issue Apr 27, 2022
Fixes: containers#14012

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
rhatdan added a commit to rhatdan/podman that referenced this issue Apr 27, 2022
Fixes: containers#14012

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
rhatdan added a commit to rhatdan/podman that referenced this issue Apr 27, 2022
Fixes: containers#14012

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
mheon pushed a commit to mheon/libpod that referenced this issue May 3, 2022
Fixes: containers#14012

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
gbraad pushed a commit to gbraad-redhat/podman that referenced this issue Jul 13, 2022
Fixes: containers#14012

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants