Commit Graph

133 Commits

Author SHA1 Message Date
b601aef207 Add --config to bash completion
The custom configuration will also be used in docker invocations made
by the completion script itself, just like `-H`.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b898111d3aac00305e93cec15c5ba8fe8decd0a1
Component: engine
2015-08-03 19:03:43 +02:00
7a79af52b9 Filter completions of docker inspect by --type
Completion now filters the images and containers by given
`--type`.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 69cde5a3024b04a59125512ebe9c504ebea2c1ac
Component: engine
2015-08-01 08:36:00 -07:00
6739612157 Fix completion of commands after a global option with arg
Without this fix, `docker -l info ` would not complete the commands.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: aab82c5c2230fa328bfac3c156b482634a42b73c
Component: engine
2015-07-31 20:16:33 +02:00
fceb28a0c5 Add completion of global options to docker daemon
It's a bit confusing: the "global options" are valid as "global options"
for all client commands (i.e. all but daemon).
Example: `docker --log-level info run`

For `docker daemon`, these "global options" are only valid as "command
options".
Example: `docker daemon --log-level info`

As command completion cannot tell which command the user is going to
type next, completion for the daemon command has to allow illegal
syntaxes like
`docker --log-level info daemon --log-level info`

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e0dad9a153fb8aad44cc36aa4bd14e297b5f120c
Component: engine
2015-07-31 20:06:45 +02:00
a6f038e8ac Add docker daemon to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 8cc8ee9254ead6ba5e4f708d7a04ac88a74ccb0a
Component: engine
2015-07-30 14:08:55 -04:00
f1dcd8a79e Fix file mode for docker bash completion
A bash completion file shouldn't have a executable bit set.
Just change file mode to 644 (instead of 755).

Signed-off-by: Dieter Reuter <dieter.reuter@me.com>
Upstream-commit: 37169daddabe19754659d8e28aaa1bf4f31c6124
Component: engine
2015-07-27 22:07:04 +02:00
f7e4d6020e Complete all known driver options if no log driver was specified
Without this fix, `docker --log-opt ` would not complete anything
because the completions were driver specific.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: de40f3997a7aae94e925d8f694e2161b1b1b92bb
Component: engine
2015-07-23 14:19:13 +02:00
f7f00cecc7 Fix problem with = in completion of docker global options
Without this fix, `docker --log-driver fluentd --log-opt fluentd-tag=b`
would complete `b` to `build`.
Completion of the commands has to be nailed to __docker_pos_first_nonflag

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6de8dd1a6e37ea6ef04d779c6348452c1a3c2370
Component: engine
2015-07-23 13:52:06 +02:00
Lei
b278b668e9 Add ulimit to docker build.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 877dbbbde8aaf6583a81d9946e4c83db8e356b1a
Component: engine
2015-07-23 10:26:06 +08:00
417958d0e1 Merge pull request #14770 from albers/completion-log-opt
Bash completion for log drivers and their options
Upstream-commit: 052b23e2901131393737829b03a7e8a37e9232f6
Component: engine
2015-07-21 19:58:12 -07:00
0bc52bd67f Second level completions for --log-opt
Advanced completion for some log driver options:
gelf-address, syslog-address, syslog-facility.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: d5aeb3398b6438ea5a1b3de4ec1e5f35d441f462
Component: engine
2015-07-21 08:25:14 +02:00
d43954849c Completion: Add support for '=' in arguments to __docker_pos_first_nonflag
This solves several problems that arise from the special treatment of
"=" in Bash.
The fix was required as some log drivers have options in a key=value
form. It also addresses the --option=value and the negated boolean syntax
(--boolean=false).

Note that this is not a general fix for these problems, it is limited to
the __docker_pos_first_nonflag function.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 38acec94c49e6730ae6bdef86b85f529c1dddda6
Component: engine
2015-07-20 21:22:56 +02:00
62e6e49ea2 Driver-specific completions for --log-opt
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: faa8b658e7e7a0e827cf7e05f64dcd2e843452ac
Component: engine
2015-07-20 20:24:01 +02:00
b663092054 Add missing log drivers to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: e09d0febe644f440e95a7a87e6fdfae8104743d6
Component: engine
2015-07-20 20:13:59 +02:00
0be39dfb3a zsh: update zsh completion for docker command
zsh completion is updated with the content of
felixr/docker-zsh-completion.

 - felixr/docker-zsh-completion@a93e1cb7bd Fix completion of repositories with tags
 - felixr/docker-zsh-completion@590ea70596 Respect provided `--host` flag when invoking docker
 - felixr/docker-zsh-completion@6c557babaa Several cosmetic improvements
 - felixr/docker-zsh-completion@5b63cc591a Update completion for `inspect`
 - felixr/docker-zsh-completion@b7d8f2f7cc Order completions alphabetically
 - felixr/docker-zsh-completion@63f6a06224 Factor completion for `build`, `create` and `run`
 - felixr/docker-zsh-completion@ade49ee47f Enforce positional arguments being last
 - felixr/docker-zsh-completion@850b6b6d95 Update completion for build/commit/export/exec/history/import
 - felixr/docker-zsh-completion@01bfd8c075 Remove completion for `insert` and duplicate of `import`
 - felixr/docker-zsh-completion@c64a1d730a Update completion for `stats` to add `--no-stream` flag
 - felixr/docker-zsh-completion@5e81d78b52 Update completion for `log` to add `--since` flag
 - felixr/docker-zsh-completion@b3c146a1a2 Update completion for `run` to add `--group-add` flag
 - felixr/docker-zsh-completion@8d4f196ad8 Don't trigger expensive completion function for flags
 - felixr/docker-zsh-completion@bd5aaa124d Add completion for `--help` everywhere
 - felixr/docker-zsh-completion@3a67a0e8c4 Return appropriate status code on completion
 - felixr/docker-zsh-completion@4dfcb450ea Add Steve as a regular contributor.
 - felixr/docker-zsh-completion@996a1c6def Add completion for top-level flags
 - felixr/docker-zsh-completion@b6df75905f Ensure short/long option are not allowed twice
 - felixr/docker-zsh-completion@75b6a500a0 Complete repositories with tags only on repository match
 - felixr/docker-zsh-completion@5e6292135f Factorize completion of images/repositories/tags
 - felixr/docker-zsh-completion@1c504eb677 Handle repositories with ":"
 - felixr/docker-zsh-completion@0a05bf818b Update completion for `pause' and `unpause'
 - felixr/docker-zsh-completion@b3a63253e2 Containers name can include Swarm host

In summary:

 - Swarm support
 - Handling repositories with ":"
 - Rework how completion of images/repositories/tags work:
    - felixr/docker-zsh-completion@5e6292135f
    - felixr/docker-zsh-completion@75b6a500a0
    - felixr/docker-zsh-completion@a93e1cb7bd

The remaining changes are here to sync changes done in Docker repository
(mostly from PR #14074 and #14555, by @sdurrheimer). With some minor changes:

 - boolean flags don't complete their arguments (true/false)
 - reuse of `--host` argument is done with `$opt_arg` to avoid parsing
   error
 - build/create/run common options are factorized out
 - `--help` flag is handled differently
 - `pause` and `unpause` accepts several containers as far as I know, so
   the change is reverted
 - some more, but difficult to notice (more completion for some flags I think)

Some labels are reverted, mostly because I did the merge by copy/pasting
new options instead of modifying existing options.

This commit is partial. The way the `--help` option is handled triggered
a major change due to the way things are quoted. Those changes were
partially and programmaticaly reverted in this commit only to minimize
the changes to review. The next commit will restore the full changes.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: 3a1596f0f5e004f59b0d140b728ca255206ef68f
Component: engine
2015-07-20 14:25:48 +02:00
b069af9e3e Merge pull request #14555 from sdurrheimer/master
Zsh completion updates and improvements
Upstream-commit: 386f11a63dec0f918e5d118bb5835ddde56a7b41
Component: engine
2015-07-15 10:40:41 -07:00
4fb7b8e2f2 Merge pull request #14608 from vincentbernat/fix/zsh-reviewers
zsh: remove Vincent Bernat from reviewers for ZSH completion
Upstream-commit: cf09e435c843516af8bbe0460cd5e1f014c0e01a
Component: engine
2015-07-14 07:08:06 -07:00
e313011735 Several cosmetic improvements in zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 91a2d9cc7d4ed47d4f255ad3d6da8295483e6a89
Component: engine
2015-07-14 11:34:33 +02:00
05b319b1cb Zsh completion update for the following commits:
- Add fluentd logging driver to zsh completion #12876
- Add inspect --type flag to zsh completion #13187
- Respect -H option in zsh completion #13195
- Fix number of argument limit for pause and unpause in zsh completion

Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 12f67141f932db15fa9178b3304c7efbd485fd69
Component: engine
2015-07-14 11:32:26 +02:00
3c6e2ebd6f zsh: remove Vincent Bernat from reviewers for ZSH completion
Signed-off-by: Vincent Bernat <vincent@bernat.im>
Upstream-commit: 5dbb217bcb8eb33c4c152f7ba1b5f7fec0b579dd
Component: engine
2015-07-13 23:15:16 +02:00
8a8cd3160c Adds documentation for additional groups.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: d77d0268eb1f419509ceb6670ff7aaa298314218
Component: engine
2015-07-13 14:47:28 -04:00
527b90ee8b Add some missing events to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ea26b3878421fd39e40ec264e604e9efa114592d
Component: engine
2015-07-07 09:04:15 +02:00
8aaef3e5b3 Flag Addition: --type flag added for docker inspect command
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 2cb74e691538351efbdee7a78be6535f22c5d024
Component: engine
2015-07-01 12:14:01 -04:00
c59f116283 Update the zsh completion
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: b2cc6f1b478f05c21ecd0c52ac6435480e53f472
Component: engine
2015-06-21 17:33:07 +02:00
7e5bfe1810 Update bash completion for 1.7.0
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b2832dffe5563486dd9dec7ed1b0183a1f320a2e
Component: engine
2015-05-29 12:42:59 +02:00
d89704cf56 Revert "Add docker exec run a command in privileged mode"
This reverts commit 72a500e9e5929b038816d8bd18d462a19e571c99.

Signed-off-by: Jessica Frazelle <princess@docker.com>

Conflicts:
	daemon/execdriver/native/exec.go
	integration-cli/docker_cli_exec_test.go
	runconfig/exec.go
Upstream-commit: 40b71adee390e9c06471b89ed845132b4ec80177
Component: engine
2015-05-26 14:12:16 -07:00
6ccd65f901 Merge pull request #13195 from albers/completion-custom-host
respect -H in bash completion
Upstream-commit: f74d9b8672df985e18f5a1d0b54c6d38618e9b11
Component: engine
2015-05-20 17:31:16 -07:00
7f98a41593 root dir for execdriver (/var/run/docker) should be configurable
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 8b2c6cb0729eadb09d688241e0f5debf1d5ccb0b
Component: engine
2015-05-15 09:30:36 -04:00
07faf7c470 respect -H in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: db5b4a2a69064c803fea249a0983dbbcb4564717
Component: engine
2015-05-13 13:39:25 -07:00
365c18080f Add --since argument to docker logs cmd
Added --since argument to `docker logs` command. Accept unix
timestamps and shows logs only created after the specified date.

Default value is 0 and passing default value or not specifying
the value in the request causes parameter to be ignored (behavior
prior to this change).

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: cb9a6b9aed1577bb5590300125d05d9b1c201c16
Component: engine
2015-05-10 20:42:14 +00:00
560ba9b809 add cpu.cfs_period_us support
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: dccb8b5c339e218222bae4ce74bbeccb9e020c82
Component: engine
2015-05-09 10:02:46 +08:00
da6438ab18 Merge pull request #10766 from cpuguy83/stats_pull_once
Allow pulling stats once and disconnecting.
Upstream-commit: 91fb4d672a8536d2f0437aeeb2dfc7b9e51aac16
Component: engine
2015-05-04 22:28:01 -07:00
9531505238 Allow pulling stats once and disconnecting.
Adds a `stream` query param to the stats API which allows API users to
only collect one stats entry and disconnect instead of keeping the
connection alive to stream more stats.

Also adds a `--no-stream` flag to `docker stats` which does the same

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f3023a93d1a0a96a7312de441a550c758ac0c17d
Component: engine
2015-05-04 10:49:13 -04:00
b42d429d30 Only complete repos with "docker pull -a"
With this, `docker pull deb<tab>` will show all `debian:*` tags, as before, but `docker pull -a deb<tab>` will complete directly to just `debian`. 👍

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 380b8737523edf1c2575208a14a8673684758692
Component: engine
2015-05-01 10:04:24 -06:00
7b559d4a5f Add docs for --exec-opt and setting native.cgroupdriver.
update man pages.
update bash completion.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: d4bbbe58ddd5916c5f7d253a90fd97e3a4fd59bf
Component: engine
2015-04-27 17:04:28 -07:00
734115a06e Add cpu cfs quota to build
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 5f4fb8be006c0ffeff2671e5752111e543e07d9f
Component: engine
2015-04-24 08:54:08 +08:00
f8f4bcdb38 Add support cpu cfs quota
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: dcc50e1d593fd7995189872791c6d7a013f16970
Component: engine
2015-04-20 08:16:47 -07:00
aaaa676179 Add docker exec run a command in privileged mode
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 72a500e9e5929b038816d8bd18d462a19e571c99
Component: engine
2015-04-11 11:26:37 +08:00
d1f2626097 Add -u|--user flag to docker exec for running command as a different user
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 2cce4791b0e75201cb65daad07d4203d1c4c2996
Component: engine
2015-04-11 11:04:24 +08:00
cf84c0b3d1 Add some missing option to bash completion
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 7105f93a72db06f9c57d6eae413883fef88102d7
Component: engine
2015-04-01 10:35:05 +08:00
208b0b8235 Merge pull request #11904 from albers/completion-filters
Add missing filters to bash completion for docker images and docker ps
Upstream-commit: 1ce39e234c815dc7416d644a02c166725fa1d8f6
Component: engine
2015-03-30 16:37:01 -07:00
90f64b3b18 Add missing filters to bash completion for docker images and docker ps
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: cf438a542e76279715dc7d414a11845725044e90
Component: engine
2015-03-29 10:13:47 -07:00
eee97805d1 Do not complete --cgroup-parent as _filedir
This is a follow-up on PR 11708, as suggested by tianon.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a09cc935c3531e0132640f0fe258041f1b445fdc
Component: engine
2015-03-28 11:32:33 -07:00
0fa020686b Merge pull request #11708 from coolljt0725/add_cgroup_parent_to_bash_completion
Add new docker run option to bash completion
Upstream-commit: e3b0014987664f8d675af2f72987c16e5733df48
Component: engine
2015-03-27 15:06:10 -07:00
d4497c7a2b .: remove trailing white spaces
blame tibor this one ;-)
```
find . -type f -not -name '*.png' -not -name '*.go' -not -name '*.md'
-not -name '*.tar' -not -name '*.pem' -not -path './vendor/*' -not -path
'./.git/*' -not -path '*/testdata/*' -not -path './docs/*images*' -not
-path '*/testfiles/*' -not -path './bundles/*' -not -path
'./docs/*static*/*' -not -path './docs/*article-img/*' -exec grep -HnEl
'[[:space:]]$' {} \; | xargs sed -iE 's/[[:space:]]*$//'
```

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 7617ec176d266650b19c2378ccab4aa41e6dc5a2
Component: engine
2015-03-25 13:38:17 -04:00
abd71318ca Revert "Dealing with trailing whitespaces"
The validation script from #10681 is too pedantic, and does not handle
well situations like:

```
cat <<EOF   # or <<-EOF
	Whether the leading whitespace is stripped out or not by bash
	it should still be considered as valid.
EOF
```

This reverts commit 4e65c1c319afffc325853b88c9aef0c42ec83482.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 0252ad0adc37a34b88fa908ae74a13b940febdcb
Component: engine
2015-03-25 10:04:56 -06:00
d00e59a1a0 Merge pull request #10681 from noironetworks/whitespaces-cleaner
Removed all trailing whitespaces from every text file
Upstream-commit: 322095ed63ec0943378485f8f8d4cabcfd471875
Component: engine
2015-03-24 16:02:14 -07:00
aca7c0f94e Add some run option to bash completion
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 7d707360159852dde4e75fc5d4778c72abc44a03
Component: engine
2015-03-24 20:15:16 +08:00
f673778d3a Merge pull request #11469 from albers/completion-cp
restrict bash completion for hostdir arg to directories
Upstream-commit: bcb369af11dc09b7c5787cffe3a5d82dee18cc19
Component: engine
2015-03-23 15:31:00 -07:00
b8ae174fd2 Merge pull request #11408 from Mashimiao/fix-wrong-tab-completion
fix wrong tab completion
Upstream-commit: ba6de9121f970f8e2576e4fa9486d3abf9c5811c
Component: engine
2015-03-20 10:46:26 -07:00