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

Listing images with docker client only shows tagged images #12567

Closed
stac47 opened this issue Dec 10, 2021 · 3 comments · Fixed by #12572
Closed

Listing images with docker client only shows tagged images #12567

stac47 opened this issue Dec 10, 2021 · 3 comments · Fixed by #12572
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

@stac47
Copy link

stac47 commented Dec 10, 2021

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Listing images with Docker CLI against Podman service only displays the tagged images.

Steps to reproduce the issue:

Three cases with docker, podman-remote and docker against podman service

  1. Docker
% docker build -q - <<EOF
FROM fedora
RUN echo 1
EOF
sha256:df38036279fe924c795d1f1543b63422e0e613c063c3c94f5c49d0ce66f0c28e
% docker image ls | head
REPOSITORY                                                 TAG        IMAGE ID       CREATED             SIZE
<none>                                                     <none>     df38036279fe   8 minutes ago       153MB
<none>                                                     <none>     f4ca4e453596   About an hour ago   153MB
<none>                                                     <none>     bfca94cab0bd   20 hours ago        1.69GB
hello_template                                             latest     00fbbbc94bd2   20 hours ago        72.8MB
<none>                                                     <none>     23592f875b9a   20 hours ago        153MB
<none>                                                     <none>     29548cc30925   20 hours ago        153MB
<none>                                                     <none>     8068ebb59642   20 hours ago        153MB
<none>                                                     <none>     ff29a13e9599   20 hours ago        153MB
<none>                                                     <none>     c8c28915e848   20 hours ago        153MB
  1. podman-remote
% ./bin/podman system service -t0
% DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock docker build -q - <<EOF
FROM fedora
RUN echo 1
EOF
9e68aebe55f0a7b7640a190313eb92aa4a1290e68144832c7ee2cd1ff34ad57c
Successfully built 9e68aebe55f0
% podman --remote image ls | head
REPOSITORY                                                                 TAG         IMAGE ID      CREATED            SIZE
<none>                                                                     <none>      9e68aebe55f0  6 minutes ago      159 MB
docker.io/library/mybaseimage                                              latest      d48d26aa814e  15 minutes ago     75.2 MB
<none>                                                                     <none>      643be959473d  49 minutes ago     75.2 MB
<none>                                                                     <none>      ca861dad6a63  50 minutes ago     75.2 MB
<none>                                                                     <none>      aeb5950d8596  52 minutes ago     75.2 MB
<none>                                                                     <none>      d40538dcc281  About an hour ago  75.2 MB
<none>                                                                     <none>      f9472b5bea3d  About an hour ago  159 MB
<none>                                                                     <none>      e49ef0b54fd7  About an hour ago  159 MB
<none>                                                                     <none>      17db18e457f7  About an hour ago  491 MB
  1. But with docker image ls against podman service:
% ./bin/podman system service -t0
% DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock docker image ls | head
REPOSITORY                                                                  TAG        IMAGE ID       CREATED          SIZE
localhost/puz-sidecar-image                                                 0.5.0      49576fc0b964   7 weeks ago      510MB
localhost/puz-sidecar-image                                                 0.6.0      4a21b2020391   7 weeks ago      510MB
localhost/test                                                              latest     076c6cbcfed9   6 weeks ago      3.03kB
localhost/basic_fragment                                                    latest     020a602b088d   6 weeks ago      184MB
alpine                                                                      latest     14119a10abf4   3 months ago     5.87MB
dockerhub.rnd.amadeus.net:5005/ubuntu                                       latest     ba6acccedd29   7 weeks ago      75.2MB
dockerhub.rnd.amadeus.net:5005/ubuntu                                       20.04      ba6acccedd29   7 weeks ago      75.2MB
localhost/ubuntu                                                            latest     ba6acccedd29   7 weeks ago      75.2MB
ubuntu                                                                      latest     ba6acccedd29   7 weeks ago      75.2MB

Describe the results you received:

I only get the tagged image whereas with docker, podman and podman-remote, I have all the image (including the untagged ones).
Moreover the flag -a is broken: it does not display the intermediate images:

% DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock docker image ls -a | head
REPOSITORY                                                                  TAG        IMAGE ID       CREATED          SIZE
localhost/puz-sidecar-image                                                 0.5.0      49576fc0b964   7 weeks ago      510MB
localhost/puz-sidecar-image                                                 0.6.0      4a21b2020391   7 weeks ago      510MB
localhost/test                                                              latest     076c6cbcfed9   6 weeks ago      3.03kB
localhost/basic_fragment                                                    latest     020a602b088d   6 weeks ago      184MB
alpine                                                                      latest     14119a10abf4   3 months ago     5.87MB
localhost/ubuntu                                                            latest     ba6acccedd29   7 weeks ago      75.2MB
ubuntu                                                                      latest     ba6acccedd29   7 weeks ago      75.2MB
dockerhub.rnd.amadeus.net:5005/ubuntu                                       latest     ba6acccedd29   7 weeks ago      75.2MB
dockerhub.rnd.amadeus.net:5005/ubuntu                                       20.04      ba6acccedd29   7 weeks ago      75.2MB

Describe the results you expected:

I would expect the same behaviour as with podman and docker

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

Output of podman version:

Fresh build of development branch

% DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock docker version
Client: Docker Engine - Community
 Version:           20.10.11
 API version:       1.40
 Go version:        go1.16.9
 Git commit:        dea9396
 Built:             Thu Nov 18 00:37:21 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: linux/amd64/ubuntu-21.10
 Podman Engine:
  Version:          4.0.0-dev
  APIVersion:       4.0.0-dev
  Arch:             amd64
  BuildTime:        2021-12-10T08:41:14Z
  Experimental:     false
  GitCommit:        f80a7fda745a96a895184b92077a6356c305c2bb
  GoVersion:        go1.17.3
  KernelVersion:    5.13.0-21-generic
  MinAPIVersion:    3.1.0
  Os:               linux
 Conmon:
  Version:          conmon version 2.0.25, commit: unknown
  Package:          conmon: /usr/bin/conmon
 OCI Runtime (crun):
  Version:          crun version 0.17
commit: 0e9229ae34caaebcb86f1fde18de3acaf18c6d9a
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  Package:          crun: /usr/bin/crun
 Engine:
  Version:          4.0.0-dev
  API version:      1.40 (minimum version 1.24)
  Go version:       go1.17.3
  Git commit:       f80a7fda745a96a895184b92077a6356c305c2bb
  Built:            Fri Dec 10 08:41:14 2021
  OS/Arch:          linux/amd64
  Experimental:     false

Output of podman info --debug:

host:                                                                                                                                                                                                                                                                [39/13536]
  arch: amd64
  buildahVersion: 1.23.1
  cgroupControllers:
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: 'conmon: /usr/bin/conmon'
    path: /usr/bin/conmon
    version: 'conmon version 2.0.25, commit: unknown'
  cpus: 8
  distribution:
    codename: impish
    distribution: ubuntu
    version: "21.10"
  eventLogger: journald
  hostname: lstacul-vm
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65536
  kernel: 5.13.0-21-generic
  linkmode: dynamic
  logDriver: journald
  memFree: 1229307904
  memTotal: 16779907072
  networkBackend: cni
  ociRuntime:
    name: crun
    package: 'crun: /usr/bin/crun'
    path: /usr/bin/crun
    version: |-
      crun version 0.17
      commit: 0e9229ae34caaebcb86f1fde18de3acaf18c6d9a
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: 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: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: 'slirp4netns: /usr/bin/slirp4netns'
    version: |-
      slirp4netns version 1.0.1
      commit: 6a7b16babc95b6a3056b33fb45b74a6f62262dd4
      libslirp: 4.4.0
  swapFree: 0
  swapTotal: 0
  uptime: 593h 40m 21.08s (Approximately 24.71 days)
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries: {}
store:
  configFile: /home/ubuntu/.config/containers/storage.conf
  containerStore:
    number: 9
    paused: 0
    running: 2
    stopped: 7
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /mnt/my-xfs/podman-user-root
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 308
  runRoot: /mnt/my-xfs/podman-user-root
  volumePath: /mnt/my-xfs/podman-user-root/volumes
version:
  APIVersion: 4.0.0-dev
  Built: 1637660361
  BuiltTime: Tue Nov 23 09:39:21 2021
  GitCommit: 1bfbb28b0365790552483b961b4bd48a69dd8070
  GoVersion: go1.17.3
  OsArch: linux/amd64
  Version: 4.0.0-dev

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

It occurs with dev HEAD but also with fedora 35 test package

podman-3.4.3-1.fc35.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/master/troubleshooting.md)

Yes

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

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 10, 2021
@jwhonce
Copy link
Member

jwhonce commented Dec 10, 2021

@rhatdan All code paths appear to use vendor/github.com/containers/common/libimage/runtime.go:530. I would run the service through delv to dig into what is causing those images to be filtered out.

@rhatdan
Copy link
Member

rhatdan commented Dec 11, 2021

I believe they are being filtered out on the client side. Which would indicate to me, that we are not doing the compat API correctly.

@flouthoc flouthoc linked a pull request Dec 17, 2021 that will close this issue
@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@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 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 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.

3 participants