Add Indicator in docker ps
for Containers Created with docker-compose
#5455
Labels
docker ps
for Containers Created with docker-compose
#5455
Description
It would be incredibly helpful if
docker ps
could include a built-in indicator showing whether a container was created usingdocker-compose
ordocker run
directly, without requiring additional commands or manual inspection.Problem
Currently, there is no straightforward way to immediately tell from
docker ps
whether a container was created withdocker-compose
. Users have to:docker inspect
to check for thecom.docker.compose
labels.This extra step makes managing large sets of containers cumbersome, especially when both
docker-compose
anddocker run
are used in parallel within a project or environment.Proposed Solution
Add an indicator in the output of
docker ps
to differentiate containers based on their creation method. For example, this could include:docker-compose
,docker run
, etc.).docker-compose
, also show the Compose project name and service name as additional columns (e.g.,PROJECT/SERVICE
).Example output
Benefits
docker-compose
and which are standalone without needing to inspect each container manually.docker inspect
or setting up custom naming schemes to differentiate container origins.Considerations
docker ps --show-origin
), depending on how cluttered the output might get in different scenarios.Closing Thoughts
This feature would significantly enhance usability, especially for users who work with both
docker-compose
anddocker run
. It would improve container management and make thedocker ps
command more informative and user-friendly.The text was updated successfully, but these errors were encountered: