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

Unable to easily sort images by size #2406

Open
stardust85 opened this issue Mar 25, 2020 · 1 comment
Open

Unable to easily sort images by size #2406

stardust85 opened this issue Mar 25, 2020 · 1 comment

Comments

@stardust85
Copy link

stardust85 commented Mar 25, 2020

Description

It leads to complicated solutions like https://github.com/pixelastic/oroshi/blob/master/scripts/bin/docker-image-list which I don't believe is necessary

Steps to reproduce the issue:

  1. create or pull some images if you don't have any
  2. docker images | sort -k5 -h

Describe the results you received:
image list NOT sorted by size

Describe the results you expected:
image list sorted by size

Additional information you deem important (e.g. issue happens only occasionally):
Probably caused by the fact that there is no tab character between the columns

Output of docker version:

Client:
 Version:           18.09.7
 API version:       1.39
 Go version:        go1.10.1
 Git commit:        2d0083d
 Built:             Fri Aug 16 14:20:06 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.09.7
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.1
  Git commit:       2d0083d
  Built:            Wed Aug 14 19:41:23 2019
  OS/Arch:          linux/amd64
  Experimental:     false

Output of docker info:

Containers: 19
 Running: 0
 Paused: 0
 Stopped: 19
Images: 149
Server Version: 18.09.7
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 
runc version: N/A
init version: v0.18.0 (expected: fec3683b971d9c3ef73f284f176672c44b448662)
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.15.0-72-generic
Operating System: Ubuntu 18.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 4.748GiB
Name: ms580j-VirtualBox
ID: 57FN:MW4D:2TJZ:UE3U:YU5T:IZD3:UERB:T7QC:GH35:BXWO:KAZX:K2AJ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
HTTP Proxy: http://135.28.13.11:8888
Registry: https://index.docker.io/v1/
Labels:
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.):
Virtualbox

@stardust85
Copy link
Author

Proposed solution: Add one tab before each column except of the first. Decrease number of spaces between columns by 8.

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

No branches or pull requests

2 participants