jesseduffield / lazydocker

The lazier way to manage everything docker
MIT License
38.82k stars 1.23k forks source link

Enhance Image Section with Active Use Indicator #509

Open mhmatthewhugley opened 9 months ago

mhmatthewhugley commented 9 months ago

Is your feature request related to a problem? Please describe. Yes, it’s challenging to quickly identify which Docker images are currently in use by containers in the images section.

Describe the solution you'd like An indicator showing whether an image is in active use. This will help users quickly identify which images are currently being utilized by containers.

There are a few methods that could be used to display this indicator:

Color Coding: The name, certain text, or background of the image could change color if it’s in active use. This would provide a quick visual cue to the user.

Symbol: A symbol (like a dot or an asterisk) could be added next to the image name to indicate active use.

Letter or Number: A letter could be used (like an ‘A’ for Active). Alternatively, a number could indicate how many containers are using that image.

Information Section: When an image is selected, the information section could include a line at the very top indicating if the image is in active use and possibly a list of what containers are using it.

Additional context This feature would enhance the Administrator experience by providing a quick and easy way to identify actively used images, thereby aiding in efficient image management.

An example of this is for anyone using Watchtower to automatically download images for their containers but manually updating them. Instead of clicking into the many images titled “none”, then clicking “d” and attempting to delete it, only to be told it is in use and cannot be deleted unless forced, it would save a lot of time. Administrators could just skip those and continue on to only the ones not actively in use. This would also let Administrators know when they need to restart the container related to the image which prevented being deleted unless forced.

mark2185 commented 9 months ago

How would you check it manually?

mhmatthewhugley commented 9 months ago

How would you check it manually?

I believe you are thinking about a command like:

docker ps -a | grep <image-name>

But for this feature request a command that could be used for finding what images are in use for the indicator is:

docker ps -a --format '{{.Image}}' | sort | uniq