Skip to content

feat: show container name alongside service name when different#802

Open
Scolliq wants to merge 1 commit into
jesseduffield:masterfrom
Scolliq:feat/show-container-names
Open

feat: show container name alongside service name when different#802
Scolliq wants to merge 1 commit into
jesseduffield:masterfrom
Scolliq:feat/show-container-names

Conversation

@Scolliq
Copy link
Copy Markdown

@Scolliq Scolliq commented Apr 25, 2026

Closes #40.

Why: When a service in docker-compose.yml has a container_name set that differs from the service name, the Services panel only shows the service name. Users who set custom container names have no way to see them at a glance.

What changed: In GetServiceDisplayStrings, if the container's actual name differs from the service name, the display string becomes service (container) — e.g. frontend (web_app). When the names are the same (the common case), nothing changes.

Before:

running frontend 0.00%
running mongodb 0.35%

After (with container_name set in docker-compose.yml):

running frontend (web_app) 0.00%
running mongodb (db_app) 0.35%

When a service has a custom container_name set in docker-compose.yml
that differs from the service name, the Services panel now shows both:
  frontend (web_app)
instead of just:
  frontend

Fixes jesseduffield#40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: show container names

1 participant