Fix: shows the container name in services window (closes #40) #714
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds container name visibility in the Services window.
Previously, LazyDocker displayed only the service name (from docker-compose.yml) but did not show the container’s actual container_name value.
This caused confusion when multiple services used custom container names.
Problem
Given a docker-compose.yml like:
services:
LazyDocker would display:
But the expected behavior is:
Users want to see both the service name and the actual container name.
Fix Implemented
Updated the UI rendering logic in the Services window.
Added container name retrieval and appended it in parentheses next to each service.
Ensures format:
service_name (container_name)
Works for all containers, including those without a custom container_name (fallback gracefully handled).
Result
Services now correctly display:
Closes: #40