Commit Graph

27 Commits

Author SHA1 Message Date
74d75a87de Refactor completion for docker run and docker create
_docker_run and _docker_create had only one differing line.

This refactoring features:

- direct completion for both commands to the same function
- factor out the common arguments, sort & format them nicely
- compute the argument for _docker_pos_first_nonflag.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 46b104bd3977c4777b0d99ba6c190f37ae780245
Component: engine
2014-12-15 21:08:49 +01:00
f439fe36a4 Minor bash completion cleanup
The -n and --networking options were removed because they are
unsupported. 
Bash completion should not reveal the existence of otherwise
undocumented unsupported options.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: eac9f2e5c4fa47b0ef1e064ac2bc62be6f3a3c99
Component: engine
2014-11-25 08:53:13 +01:00
3701f3bcf6 Add missing options to bash completion for the run and create commands
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 2e863e8a3849f6ea34dd281aac6f8a6c700bf029
Component: engine
2014-11-25 08:53:12 +01:00
381b9857ce Fix support for --env-file in bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ba311ee58a7114270d7853ebae5f1e86efdc8005
Component: engine
2014-10-14 17:45:29 +02:00
46af7d8ab7 Merge pull request #8364 from tianon/bash-completion-filters
Optimize the bash completion even further
Upstream-commit: 45667fb1bb30fb206dd6c481f0bd8952c68cf122
Component: engine
2014-10-02 15:00:01 -07:00
641063cc8e Optimize the bash completion even further
The biggest/bestest change here is cutting down on the number of calls to Docker in the filtering helpers (`__docker_containers_running`, etc), especially calls to the really heavy `docker images`.

Signed-off-by: Andrew Page <admwiggin@gmail.com>
Upstream-commit: 0597b6445db0b0aeb4a0459f3af4f074a865a42f
Component: engine
2014-10-02 15:13:37 -06:00
9056c02a80 add bash completion support for pause and unpause
Signed-off-by: Michael Scharf <github@scharf.gr>
Upstream-commit: cbb81c30bd50952f84d4a60e850c1cede3318a77
Component: engine
2014-10-02 14:18:47 -06:00
fe37a1db8f Add --security-opts options to allow user to customize security configuration
security-opts will allow you to customise the security subsystem.

For example the labeling system like SELinux will run on a container.

    --security-opt="label:user:USER"   : Set the label user for the container
    --security-opt="label:role:ROLE"   : Set the label role for the container
    --security-opt="label:type:TYPE"   : Set the label type for the container
    --security-opt="label:level:LEVEL" : Set the label level for the container
    --security-opt="label:disabled"    : Turn off label confinement for the container

Since we are passing a list of string options instead of a space separated
string of options, I will change function calls to use InitLabels instead of
GenLabels.  Genlabels interface is Depracated.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 87e732a0f3503517d7a66804bb9a7f74977347e5
Component: engine
2014-09-30 00:06:22 +00:00
4cbe53bc28 Add create to contrib/completion
Signed-off-by: Tibor Vass <teabee89@gmail.com>
Upstream-commit: 1ec283c3eb37d514be3778537c7ef9d727337f52
Component: engine
2014-09-16 18:40:25 -04:00
ad141b9260 Add exec to autocompletions
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: c9c004d700af23c238adef40a1e579d21c6c5765
Component: engine
2014-09-16 13:01:10 -07:00
6cc4adf9ba Add --force-rm to docker build command completion
Signed-off-by: Thomas LEVEIL <thomasleveil@gmail.com>
Upstream-commit: 40f0bf75640f686b2160092db6fc874e672cfd16
Component: engine
2014-09-03 14:26:16 +02:00
2ff183b13e Merge pull request #6755 from tianon/bash-completion-for-link-and-bind
Update bash completion for "docker run --link" and "docker run -v" to complete on running containers and the local filesystem respectively
Upstream-commit: 47de2e32698e7adbc3b1292186ce9dcddc15cf41
Component: engine
2014-07-15 00:15:13 -06:00
58d9480aa6 Update bash completion to only complete on directories as the argument to "docker build"
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 91769117365207ad3218ee7bea6c472583b3ba2b
Component: engine
2014-07-08 20:26:23 -06:00
fd631db79c Update bash completion for "docker run --link" and "docker run -v" to complete on running containers and the local filesystem respectively
Also, add completion for "docker run -a" ("stdin", "stdout", and "stderr"), "docker run --env-file" (local filesystem), and some other minor code style tweaks.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 86f06b6deb6e5b9ddb30f781e81cc5b6241e20ae
Component: engine
2014-06-28 23:17:51 -06:00
8c910849c0 Add bash completion for "docker rm -f" and complete on all containers instead of just stopped containers when "-f" is specified
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 5e256799ddd6a297e22756363fc5eb079af0f07e
Component: engine
2014-06-25 22:12:25 -06:00
d94d81180e Merge pull request #6547 from tianon/update-bash-completion-for-pushing-tags
Update bash-completion to reflect ability to push single tags
Upstream-commit: 2eac1c4bc5e3b77a99d94811cc481bc27b648ee0
Component: engine
2014-06-19 12:40:31 -06:00
a9640bbe8b Update bash-completion to reflect ability to push single tags
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: bdf4b74b52cb313a869a0b15d1eb315a79e1cd52
Component: engine
2014-06-19 10:11:32 -06:00
b42966840e cleanup all mentions of insert
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 3e2a9f667fbfd2b526b5bab4f8983f8c44685e87
Component: engine
2014-06-18 23:13:54 +00:00
6fe0f07752 Changed all references from Trusted Builds to Automated Builds
* Updated docker images output
* Deprecated docker images -t/--trusted option and replace with --automated
* Changed *trusted variables to *automated
* Changed added support for is_automated alongside deprecated is_trusted
* Updated man pages, docs and completion
* Updated API documentation

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)
Upstream-commit: 9fc8028c987ac560ceb3b29eb609d77a82abdacc
Component: engine
2014-06-03 12:55:30 -07:00
5ac53676ce Using names in docker ps --since-id/--before-id, resolves #3565
Also renames --since-id/--before-id to --since/--before and add errors
on non-existent containers.
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: c1f2abd89958a8731211ceb2885eed238a3bea8d
Component: engine
2014-03-18 23:30:21 +04:00
3db540f2fc Update bash completion to ignore stderr output of docker binary
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 9152aab653294f8f8b2f206a2ccc3c8603f33d0c
Component: engine
2014-01-20 01:26:01 -07:00
98435ab7c4 Switch docker run --username to docker run --user which is more accurate (while we can still do so without breaking anyone's scripts)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: fb981bdace66e5b34d41125beb16e450998fd1e7
Component: engine
2014-01-20 00:28:55 -07:00
38cccce275 Resync bash completion to include all flags defined in the code, and to autocomplete properly on all parameters that are reasonably possible to do so on today
This also includes several new minor features that are interesting, so do explore a little. :)

Finally, this also fixes a few bugs where commands would complete parameters that they won't necessarily accept.  We still have a few of these cases, but they're reduced to a minimum now.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: c6e43154f186c9fac8501016473b459db3130222
Component: engine
2014-01-20 00:28:55 -07:00
7822beced6 update commands.go
update docker.go

move to pkg

update docs

update name and copyright

change --sinceId to --since-id, update completion and docs

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor@docker.com> (github: vieux)
Upstream-commit: e71dbf4ee5add5736f595948fc20bd01af56a744
Component: engine
2014-01-17 17:33:15 -08:00
deba21c185 support for container names in bash completion
Upstream-commit: 055b32e3f4adfd490449b41d0cd6bc6ad5b7466a
Component: engine
2013-12-31 11:34:23 +00:00
47ebac600d rebase and add some filters
Upstream-commit: 747967b4a4e2bfa429a76d20db77b990d23b1a0f
Component: engine
2013-10-31 19:25:55 -07:00
66869bbf80 Move contrib/docker.bash to contrib/completion/bash/docker for better organization
Upstream-commit: e99ab1df9758bd7bd819e87bf231399ef8f031d6
Component: engine
2013-10-15 03:02:31 -06:00