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

docker image ls --filter=reference=docker.io/$MY/$IMG != docker image ls --filter=reference=$MY/$IMG #47809

Open
fenollp opened this issue May 8, 2024 · 0 comments
Labels
kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/0-triage

Comments

@fenollp
Copy link

fenollp commented May 8, 2024

Description

Filtering images by ref with and without host prefix (e.g. docker.io) does not give the same results. Actually the former gives no results at all.

λ docker image ls --format=json --filter=reference=fenollp/myimgcach:* 
{"Containers":"N/A","CreatedAt":"2024-05-08 09:48:55 +0200 CEST","CreatedSince":"35 minutes ago","Digest":"\u003cnone\u003e","ID":"5815a4e70b52","Repository":"fenollp/myimgcach","SharedSize":"N/A","Size":"1.16MB","Tag":"latest","UniqueSize":"N/A","VirtualSize":"1.156MB"}
{"Containers":"N/A","CreatedAt":"2024-05-08 09:48:53 +0200 CEST","CreatedSince":"35 minutes ago","Digest":"\u003cnone\u003e","ID":"d7a752b10f6f","Repository":"fenollp/myimgcach","SharedSize":"N/A","Size":"2.8MB","Tag":"lib-chrono-0.4.19-5b48670b54258911","UniqueSize":"N/A","VirtualSize":"2.803MB"}
{"Containers":"N/A","CreatedAt":"2024-05-08 09:48:51 +0200 CEST","CreatedSince":"35 minutes ago","Digest":"\u003cnone\u003e","ID":"9e552a899650","Repository":"fenollp/myimgcach","SharedSize":"N/A","Size":"5.04MB","Tag":"lib-clap-3.0.6-a7f118c546371e9c","UniqueSize":"N/A","VirtualSize":"5.042MB"}
...

λ docker image ls --format=json --filter=reference=docker.io/fenollp/myimgcach:* 
(nothing and no error)

Reproduce

  1. docker build --tag=docker.io/$MY/$IMAGE:latest ...
  2. docker image ls --format=json --filter=reference=docker.io/$MY/$IMG:*
  3. docker image ls --format=json --filter=reference=$MY/$IMG:*

Expected behavior

Outputs should be equal (modulo lines order anyway)

docker version

Client: Docker Engine - Community
 Version:           26.1.1
 API version:       1.45
 Go version:        go1.21.9
 Git commit:        4cf5afa
 Built:             Tue Apr 30 11:48:02 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.1.1
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.9
  Git commit:       ac2de55
  Built:            Tue Apr 30 11:48:02 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.31
  GitCommit:        e377cd56a71523140ca6ae87e30244719194a521
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client: Docker Engine - Community
 Version:    26.1.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.25.0
    Path:     /home/pete/.docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 212
 Server Version: 26.1.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: e377cd56a71523140ca6ae87e30244719194a521
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.5.0-28-generic
 Operating System: Ubuntu 23.10
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 15.32GiB
 Name: solaralchemist
 ID: 4ff1ee7f-a3ff-4df0-ad6e-9d0162ddbda5
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: fenollp
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional Info

Note as well that digest info is missing (none) in format=json output:

{"Containers":"N/A","CreatedAt":"1970-01-01 01:00:00 +0100 CET","CreatedSince":"54 years ago","Digest":"\u003cnone\u003e","ID":"a36a703bdf49","Repository":"fenollp/myimgcach","SharedSize":"N/A","Size":"692kB","Tag":"lib-num-integer-0.1.44-a6149b590e3d39db","UniqueSize":"N/A","VirtualSize":"691.7kB"}

PS: I don't believe this is related to #35536

@fenollp fenollp added kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/0-triage labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/0-triage
Projects
None yet
Development

No branches or pull requests

1 participant