557dc09d71e489790742ed8603e929edb48fb071

Author
UserTaken <elysian@live.com>
Committer
UserTaken <elysian@live.com>
Date

Message

More run and create options

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/docker/_docker b/plugins/docker/_docker
  2index fd459a0cac85e2a12d2fcbeaf4a0d11843dea59b..bd494ecaa0913b7586fd851fbff8d863aa6c35ed 100644
  3--- a/plugins/docker/_docker
  4+++ b/plugins/docker/_docker
  5@@ -36,7 +36,7 @@ __docker_images() {
  6 # ---------------------------
  7 __attach() {
  8     _arguments \
  9-        '--no-stdin[Do not attach stdin]' \
 10+        '--no-stdin[Do not attach STDIN]' \
 11         '--sig-proxy[Proxify all received signal to the process (even in non-tty mode)]'
 12     __docker_containers
 13 }
 14@@ -55,6 +55,7 @@ __commit() {
 15         '(-a,--author=)'{-a,--author=}'[Author (eg. "John Hannibal Smith <hannibal@a-team.com>"]' \
 16         '(-m,--message=)'{-m,--message=}'[Commit message]' \
 17         '--run=[Config automatically applied when the image is run.]'
 18+        '(-p,--pause=)'{-p,--pause=}'[Pause container during commit]' \
 19     __docker_containers
 20 }
 21 
 22@@ -62,6 +63,48 @@ __cp() {
 23     __docker_containers
 24 }
 25 
 26+__create() {
 27+    _arguments \
 28+        '(-P,--publish-all=)'{-P,--publish-all=}'[Publish all exposed ports to the host interfaces]' \
 29+        '(-a,--attach=)'{-a,--attach=}'[Attach to STDIN, STDOUT or STDERR]' \
 30+        '--add-host=[Add a custom host-to-IP mapping]' \
 31+        '--cap-add=[Add Linux capabilities]' \
 32+        '--cap-drop=[Drop Linux capabilities]' \
 33+        '(-c,--cpu-shares=)'{-c,--cpu-shares=}':[CPU shares (relative weight)]' \
 34+        '--cidfile=[Write the container ID to the file]' \
 35+        '--device=[Add a host device to the container]' \
 36+        '--dns=[Set custom dns servers]' \
 37+        '--dns-search=[Set custom DNS search domains]' \
 38+        '(-e,--env=)'{-e,--env=}'[Set environment variables]' \
 39+        '--env-file=[Read in a file of environment variables]' \
 40+        '--entrypoint=[Overwrite the default entrypoint of the image]' \
 41+        '--expose=[Expose a port from the container without publishing it to your host]' \
 42+        '(-h,--hostname=)'{-h,--hostname=}'[Container host name]' \
 43+        '(-i,--interactive=)'{-i,--interactive=}'[Keep STDIN open even if not attached]' \
 44+        '--ipc=[IPC namespace to use]' \
 45+        '(-l,--label=)'{-l,--label=}'[Set meta data on a container]' \
 46+        '--link=[Add link to another container (name:alias)]' \
 47+        '--log-driver=[Logging driver for the container]' \
 48+        '--lxc-conf=[Add custom LXC options]' \
 49+        '--mac-address=[Container MAC address (e.g. 92:d0:c6:0a:29:33)]' \
 50+        '(-m,--memory=)'{-m,--memory=}'[Memory limit (format: <number><optional unit>, where unit = b, k, m or g)]' \
 51+        '--net=[Set the Network mode for the container]' \
 52+        '--name=[Assign a name to the container]' \
 53+        '--pid=[PID namespace to use]' \
 54+        '(-p,--publish=)'{-p,--publish=}'[Publish a container''s port to the host (format: ip:hostPort:containerPort/protocol)]' \
 55+        '--privileged=[Give extended privileges to this container]' \
 56+        '--restart=[Restart policy to apply when a container exits]' \
 57+        '--security-opt=[Security Options]' \
 58+        '--sig-proxy=[Proxify all received signal to the process (even in non-tty mode)]' \
 59+        '(-t,--tty=)'{-t,--tty=}'[Allocate a pseudo-tty]' \
 60+        '(-u,--user=)'{-u,--user=}'[Username or UID]' \
 61+        '--ulimit=[Ulimit options]' \
 62+        '(-v,--volume=)'{-v,--volume=}'[Bind mount a volume (e.g. -v /host:/container or -v /container)]' \
 63+        '--volumes-from=[Mount volumes from the specified container(s)]' \
 64+        '(-w,--workdir=)'{-w,--workdir=}'[Working directory inside the container]'
 65+    __docker_images
 66+}
 67+
 68 __diff() {
 69     __docker_containers
 70 }
 71@@ -100,11 +143,6 @@ __info() {
 72     # no arguments
 73 }
 74 
 75-__insert() {
 76-    __docker_images
 77-    _arguments '*:files:_files'
 78-}
 79-
 80 __inspect() {
 81     __docker_images
 82     __docker_all_containers
 83@@ -185,28 +223,42 @@ __rmi() {
 84 __run() {
 85     _arguments \
 86         '(-P,--publish-all=)'{-P,--publish-all=}'[Publish all exposed ports to the host interfaces]' \
 87-        '(-a,--attach=)'{-a,--attach=}'[Attach to stdin, stdout or stderr.]' \
 88-        '(-c,--cpu-shares=)'{-c,--cpu-shares=}': CPU shares (relative weight)]' \
 89+        '(-a,--attach=)'{-a,--attach=}'[Attach to STDIN, STDOUT or STDERR]' \
 90+        '--add-host=[Add a custom host-to-IP mapping]' \
 91+        '--cap-add=[Add Linux capabilities]' \
 92+        '--cap-drop=[Drop Linux capabilities]' \
 93+        '(-c,--cpu-shares=)'{-c,--cpu-shares=}':[CPU shares (relative weight)]' \
 94         '--cidfile=[Write the container ID to the file]' \
 95-        '(-d,--detach=)'{-d,--detach=}'[Detached mode: Run container in the background, print new container id]' \
 96+        '(-d,--detach=)'{-d,--detach=}'[Run container in the background, print new container id]' \
 97+        '--device=[Add a host device to the container]' \
 98         '--dns=[Set custom dns servers]' \
 99+        '--dns-search=[Set custom DNS search domains]' \
100         '(-e,--env=)'{-e,--env=}'[Set environment variables]' \
101+        '--env-file=[Read in a file of environment variables]' \
102         '--entrypoint=[Overwrite the default entrypoint of the image]' \
103         '--expose=[Expose a port from the container without publishing it to your host]' \
104         '(-h,--hostname=)'{-h,--hostname=}'[Container host name]' \