docker images --filter=reference giving seemingly unpredictable results
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
Having read https://github.com/docker/cli/issues/625, I've tried using docker images --filter=reference= with various permutations of repository name, tag and wildcards … and the results seem to be a bit unpredictable. I'm not sure if it is me, the documentation or the software.
Steps to reproduce the issue:
- Run
docker imagesfirst of all to get a list of all of the images on the system. - Try
docker images --filter reference="*:latest"as suggested by issue 625. - Try
docker images --filter reference='linaroits*:CON*'as a wildcard filter. - Try
docker images --filter reference='*:*18*'as a wildcard filter. - Try
docker images --filter reference='*:*18'as a wildcard filter. - Try
docker images --filter reference='*:CON*'as a wildcard filter. - Try
docker images --filter reference='*:*CON*'as a wildcard filter.
Describe the results you received:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
linaroits/jekyllsitebuild CON-JBC-JOB1-22 44360d759a69 4 days ago 633 MB
linaroits/jekyllsitebuild latest 44360d759a69 4 days ago 633 MB
linaroits/jekyllsitebuild CON-JBC-JOB1-21 e01c7c71e91b 4 days ago 633 MB
linaroits/jekyllsitebuild CON-JBC-JOB1-19 2b0eca716029 2 weeks ago 633 MB
linaroits/jekyllsitebuild CON-JBC-JOB1-20 2b0eca716029 2 weeks ago 633 MB
linaroits/jekyllsitebuild CON-JBC-JOB1-18 7d8401025378 3 weeks ago 632 MB
linaroits/jekyllsitebuild CON-JBC-JOB1-17 9ea9abcb0b95 3 weeks ago 632 MB
linaroits/jekyllsitebuild CON-JBC-JOB1-16 1e6a32a8b36d 3 weeks ago 632 MB
linaroits/jekyllsitebuild CON-JBC-JOB1-15 42602caf4124 3 weeks ago 632 MB
linaroits/odpdocsbuild latest 9264947a316c 3 weeks ago 1.14 GB
$ docker images --filter=reference="*:latest"
REPOSITORY TAG IMAGE ID CREATED SIZE
$ docker images --filter=reference='linaroits*:CON*'
REPOSITORY TAG IMAGE ID CREATED SIZE
$ docker images --filter=reference="*:*18*"
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu 18.04 735f80812f90 5 weeks ago 83.5 MB
$ docker images --filter=reference="*:*18"
REPOSITORY TAG IMAGE ID CREATED SIZE
$ docker images --filter=reference="*:CON*"
REPOSITORY TAG IMAGE ID CREATED SIZE
$ docker images --filter=reference="*:*CON*"
REPOSITORY TAG IMAGE ID CREATED SIZE
Describe the results you expected:
-
I would have expected the two images with a tag of
latestto be listed. -
I would have expected the 8 images with a repository starting
linaroitsand a tag startingCONto be listed. -
I would have expected
linaroits/jekyllsitebuild:CON-JBC-JOB1-18to be included in the output. -
I would have expected
linaroits/jekyllsitebuild:CON-JBC-JOB1-18to be included in the output. -
I would have expected all images with a tag starting
CONto be listed. -
I would have expected all images with
CONsomewhere in the tag to be listed which, in my case, would be the same output as test 6 would have produced.
Output of docker version:
Client:
Version: 17.03.2-ce
API version: 1.27
Go version: go1.6.2
Git commit: f5ec1e2
Built: Thu Jul 5 23:07:48 2018
OS/Arch: linux/amd64
Server:
Version: 17.03.2-ce
API version: 1.27 (minimum version 1.12)
Go version: go1.6.2
Git commit: f5ec1e2
Built: Thu Jul 5 23:07:48 2018
OS/Arch: linux/amd64
Experimental: false
Output of docker info:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 72
Server Version: 17.03.2-ce
Storage Driver: aufs
Root Dir: /srv/docker/aufs
Backing Filesystem: extfs
Dirs: 60
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 4ab9917febca54791c5f071a9d1f404867857fcc
runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
init version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-1063-aws
Operating System: Ubuntu 16.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.795 GiB
Name: ip-10-0-0-18
ID: 54YX:6QXI:5QDF:P5FV:M5JS:Y75Z:VNUD:SVEI:MO7N:UVFL:5RRM:G3LZ
Docker Root Dir: /srv/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
Additional environment details (AWS, VirtualBox, physical, etc.):
Docker is running on Ubuntu 16.04 AWS EC2 instance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the docker images command entry point and reproduce the listed --filter=reference commands against images with matching repository and tag patterns. Compare the observed matches with the expected results in the issue; done means wildcard reference filters consistently return the expected images or their documented semantics are clarified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100