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 plugin ls command output is not sorted by plugin name #1164

Closed
adshmh opened this issue Jun 29, 2018 · 3 comments · Fixed by #1166
Closed

docker plugin ls command output is not sorted by plugin name #1164

adshmh opened this issue Jun 29, 2018 · 3 comments · Fixed by #1166

Comments

@adshmh
Copy link
Contributor

adshmh commented Jun 29, 2018

Description
The output from docker plugin ls command is not sorted by plugin names (and changes order on repeating the command), e.g.:

$docker plugin ls
ID                  NAME                DESCRIPTION         ENABLED
c753fbc35b07        p1:latest           test plugin         false
8f818da86d15        p2:latest           test plugin         false
013f0525e658        p3:latest           test plugin         false
3e2fbda236fb        p5:latest           test plugin         false
917784fbd37c        p4:latest           test plugin         false

running the command again:

$ docker plugin ls
ID                  NAME                DESCRIPTION         ENABLED
917784fbd37c        p4:latest           test plugin         false
c753fbc35b07        p1:latest           test plugin         false
8f818da86d15        p2:latest           test plugin         false
013f0525e658        p3:latest           test plugin         false
3e2fbda236fb        p5:latest           test plugin         false

Steps to reproduce the issue:

  1. Create a few plugins
  2. Run docker plugin ls a few times and compare the output

Describe the results you received:
No specific order in the list of plugins

Describe the results you expected:
List of plugins sorted by name

@adshmh
Copy link
Contributor Author

adshmh commented Jun 29, 2018

The code of the plugin list command does not seem to sort the list of plugins it receives.
If sorting by name (or other criteria) is the expected behavior, I will submit a PR for it.

@cpuguy83
Copy link
Collaborator

Deterministic listing would indeed be nice.

@thaJeztah
Copy link
Member

There's some old PR's that added natural sorting to some other list views, and could be used for guidance; #315, #357, #307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants