Added top to docker-compose to display running processes.
This commit allows `docker-compose` to access `top` for containers much like running `docker top` directly on a given container. This commit includes: * `docker-compose` CLI changes to expose `top` * Completions for `bash` and `zsh` * Required testing for the new `top` command Signed-off-by: Peter Urda <peter.urda@gmail.com>
This commit is contained in:
parent
1f39b33357
commit
a67500ee57
5 changed files with 72 additions and 0 deletions
|
|
@ -434,6 +434,18 @@ _docker_compose_stop() {
|
|||
}
|
||||
|
||||
|
||||
_docker_compose_top() {
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
__docker_compose_services_running
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
_docker_compose_unpause() {
|
||||
case "$cur" in
|
||||
-*)
|
||||
|
|
@ -499,6 +511,7 @@ _docker_compose() {
|
|||
scale
|
||||
start
|
||||
stop
|
||||
top
|
||||
unpause
|
||||
up
|
||||
version
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue