Commit Graph

59 Commits

Author SHA1 Message Date
Peter Urda a67500ee57
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>
2017-02-01 15:42:30 -08:00
Matt Bray a37d99f201 Zsh completion: change --file description text
Signed-off-by: Matt Bray <mattjbray@gmail.com>
2016-09-30 00:45:46 +01:00
Matthew Bray 90356b7040 Zsh completion: permit multiple --file arguments
Before this change:

```
$ docker-compose --file docker-compose.yml -<TAB>
 -- option --
--help                 -h  -- Get help
--host                 -H  -- Daemon socket to connect to
--project-name         -p  -- Specify an alternate project name (default: directory name)
--skip-hostname-check      -- Don't check the daemon's hostname against the name specified in the client certificate (for example if your docker host is an IP address)
--tls                      -- Use TLS; implied by --tlsverify
--tlscacert                -- Trust certs signed only by this CA
--tlscert                  -- Path to TLS certificate file
--tlskey                   -- Path to TLS key file
--tlsverify                -- Use TLS and verify the remote
--verbose                  -- Show more output
--version              -v  -- Print version and exit
```

(Note the `--file` argument is no longer available to complete.)

After this change:

```
docker-compose --file docker-compose.yml -<TAB>
 -- option --
--file                 -f  -- Specify an alternate docker-compose file (default: docker-compose.yml)
--help                 -h  -- Get help
--host                 -H  -- Daemon socket to connect to
--project-name         -p  -- Specify an alternate project name (default: directory name)
--skip-hostname-check      -- Don't check the daemon's hostname against the name specified in the client certificate (for example if your docker host is an IP address)
--tls                      -- Use TLS; implied by --tlsverify
--tlscacert                -- Trust certs signed only by this CA
--tlscert                  -- Path to TLS certificate file
--tlskey                   -- Path to TLS key file
--tlsverify                -- Use TLS and verify the remote
--verbose                  -- Show more output
--version              -v  -- Print version and exit
```

Signed-off-by: Matt Bray <mattjbray@gmail.com>
2016-09-28 12:04:13 +01:00
Aanand Prasad 6633f1962c Shell completion for --push-images
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-27 16:00:53 +01:00
Aanand Prasad bc0939dcf0 Merge pull request #3645 from leonhartX/zsh-completion-bundle
add zsh completion support for bundle
2016-06-30 10:32:44 -07:00
Aanand Prasad c0237a487b Merge pull request #3221 from aeriksson/fix-zsh-autocomplete
Fix zsh autocomplete
2016-06-29 11:08:08 -07:00
Ke Xu edd28f09d1 change dsb to dab
Signed-off-by: Ke Xu <leonhartx.k@gmail.com>
2016-06-29 11:01:50 +09:00
Andre Eriksson c3247e7af8 zsh autocomplete: update misleading comment
Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:07:59 -07:00
Andre Eriksson b3d4e9c9d7 zsh autocomplete: break out duplicated flag messages into variables
Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Andre Eriksson 0058b4ba0c zsh autocomplete: replace use of sed with cut
Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Andre Eriksson 612d263d74 zsh autocomplete: fix issue when filtering on already selected services
Previously, the filtering on already selected services would break when
one service was a substring of another.

This commit fixes that.

Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Andre Eriksson 048408af48 zsh autocomplete: fix missing services issue for build/pull commands
Previously, the autocomplete for the build/pull commands would only add
services for which build/image were the _first_ keys, respectively, in
the docker-compose file.

This commit fixes this, so the appropriate services are listed
regardless of the order in which they appear

Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Andre Eriksson d990f7899c zsh autocomplete: pass all relevant flags to docker-compose/docker
For autocomplete to work properly, we need to pass along some flags when
calling docker (--host, --tls, …) and docker-compose (--file, --tls, …).

Previously flags would only be passed to docker-compose, and the only
flags passed were --file and --project-name.

This commit makes sure that all relevant flags are passed to both
docker-compose and docker.

Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Andre Eriksson 97ba14c82a zsh autocomplete: use two underscores for all function names
Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Andre Eriksson 1b5a94f4e4 zsh autocomplete: bring flag help texts up to date
Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Andre Eriksson 8d2fbe3a55 zsh autocomplete: add 'build' flag for 'create' and 'up'
Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Andre Eriksson eb10f41d13 zsh autocomplete: fix incorrect flag exclusions for 'create' and 'up'
Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Andre Eriksson 73a1b60ced zsh autocomplete: add missing 'remove-orphans' flag for 'up' and 'down'
Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Andre Eriksson b3d9652cc3 zsh autocomplete: add missing docker-compose base flags
Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Andre Eriksson cbb44b1a14 fix broken zsh autocomplete for version 2 docker-compose files
This has the added benefit of making autocompletion work when the
docker-compose config file is in a parent directory.

Signed-off-by: Andre Eriksson <aepubemail@gmail.com>
2016-06-27 11:00:17 -07:00
Ke Xu a0a90b2352 add zsh completion for push
Signed-off-by: Ke Xu <leonhartx.k@gmail.com>
2016-06-27 18:00:52 +09:00
Ke Xu aa7f522ab0 add zsh completion support for bundle
Signed-off-by: Ke Xu <leonhartx.k@gmail.com>
2016-06-27 17:48:14 +09:00
Harald Albers c46737ed02 remove command completion for `docker-compose rm --a`
As `--all|-a` is deprecated, there's no use to suggest it any
more in command completion.

Signed-off-by: Harald Albers <github@albersweb.de>
2016-05-26 12:48:53 -07:00
Aanand Prasad 85e2fb63b3 Merge pull request #3218 from sdurrheimer/zsh-completion-run-workdir
Add zsh completion for 'docker-compose run -w --workdir'
2016-03-29 16:50:12 +01:00
Aanand Prasad 024a810617 Merge pull request #3217 from sdurrheimer/zsh-completion-up-build
Add zsh completion for 'docker-compose up --build'
2016-03-29 16:49:49 +01:00
Aanand Prasad 668d45c7cc Merge pull request #3216 from sdurrheimer/zsh-completion-logs
Add zsh completion for 'docker-compose logs -f --follow --tail -t --t…
2016-03-29 16:49:36 +01:00
Aanand Prasad 09ea74245d Merge pull request #3215 from sdurrheimer/zsh-completion-exec-command
Add zsh completion for 'docker-compose exec' command
2016-03-29 16:49:15 +01:00
Steve Durrheimer 8ae8f7ed4b Add zsh completion for 'docker-compose run -w --workdir'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-03-25 19:25:33 +01:00
Steve Durrheimer 9729c0d3c7 Add zsh completion for 'docker-compose up --build'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-03-25 19:15:34 +01:00
Steve Durrheimer 9d58b19ecc Add zsh completion for 'docker-compose logs -f --follow --tail -t --timestamps'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-03-25 19:09:53 +01:00
Steve Durrheimer 63b448120a Add zsh completion for 'docker-compose exec' command
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-03-25 19:03:36 +01:00
Steve Durrheimer 0f1fb42326 Add zsh completion for 'docker-compose rm -a --all'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-03-25 18:52:28 +01:00
Steve Durrheimer 381d58bc66 Add zsh completion for 'docker-compose create'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-01-25 10:27:21 +01:00
Aanand Prasad 413cdbcb81 Merge pull request #2675 from sdurrheimer/zsh-completion-up-abort-on-container-exit
Add zsh completion for 'docker-compose up --abort-on-container-exit'
2016-01-19 10:41:08 +00:00
Aanand Prasad 683c8b0067 Merge pull request #2676 from sdurrheimer/zsh-completion-down-command
Add zsh completion for 'docker-compose down'
2016-01-19 10:40:29 +00:00
Steve Durrheimer d54190167a Fix zsh completion to ensure we have enough commands to store in the cache
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-01-16 13:53:16 +01:00
Steve Durrheimer f6561f1290 Add zsh completion for 'docker-compose down'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-01-16 13:47:48 +01:00
Steve Durrheimer e7180982aa Add zsh completion for 'docker-compose up --abort-on-container-exit'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-01-16 13:22:02 +01:00
Aanand Prasad a08e02f3bd Merge pull request #2643 from sdurrheimer/zsh-completion-events
Add zsh completion for 'docker-compose events'
2016-01-13 21:10:36 +00:00
Aanand Prasad a027a0079c Use networking for version 2 Compose files
- Remove --x-networking and --x-network-driver
- There's now no way to set a network driver - this will be added back
  with the 'networks' key

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-12 21:29:40 +00:00
Steve Durrheimer b59387401c Add zsh completion for 'docker-compose events'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-01-12 22:04:05 +01:00
Daniel Nephin 2acc29cf1c Remove support for fig.yaml, FIG_FILE, and FIG_PROJECT_NAME.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-04 15:37:21 -05:00
Steve Durrheimer 01bba5ea23 Add zsh completion for config subcommand
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2015-12-09 08:57:14 +01:00
Daniel Nephin a21f9993b3 Remove migrate-to-labels.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-27 12:04:45 -05:00
Adrian Budau c5c36d8b00 Added --force-rm to compose build.
It's a flag passed to docker build that removes the intermediate
containers left behind on fail builds.

Signed-off-by: Adrian Budau <budau.adi@gmail.com>
2015-11-10 13:05:04 -05:00
Steve Durrheimer ac06366ef9 Add zsh completion for 'docker-compose --x-networking --x-network-driver'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2015-10-19 12:31:17 +02:00
mnowster b9252aa48e Merge pull request #2032 from villlem/master
Flag to skip all pull errors when pulling images
2015-09-21 13:41:08 +01:00
Aanand Prasad 36d886b8b0 Merge pull request #2073 from sdurrheimer/zsh-completion-run-name
Add zsh completion for 'docker-compose run --name'
2015-09-21 12:35:29 +02:00
Vojta Orgon c9083e21c8 Flag to skip all pull errors when pulling images.
Signed-off-by: Vojta Orgon <villlem@gmail.com>
2015-09-21 11:59:23 +02:00
Steve Durrheimer 51ce16cf18 Add zsh completion for 'docker-compose build --build'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2015-09-18 22:46:08 +02:00