Allow manual port mapping when using "run" command. Fixes #1709

Signed-off-by: Karol Duleba <mr.fuxi@gmail.com>
This commit is contained in:
Karol Duleba 2015-08-07 13:42:37 +01:00
commit ff87ceabbd
6 changed files with 87 additions and 2 deletions

View file

@ -248,7 +248,7 @@ _docker-compose_run() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-d --entrypoint -e --help --no-deps --rm --service-ports -T --user -u" -- "$cur" ) )
COMPREPLY=( $( compgen -W "-d --entrypoint -e --help --no-deps --rm --service-ports --publish -p -T --user -u" -- "$cur" ) )
;;
*)
__docker-compose_services_all

View file

@ -221,6 +221,7 @@ __docker-compose_subcommand () {
'(-u --user)'{-u,--user=-}'[Run as specified username or uid]:username or uid:_users' \
"--no-deps[Don't start linked services.]" \
'--rm[Remove container after run. Ignored in detached mode.]' \
"--publish[Run command with manually mapped container's port(s) to the host.]" \
"--service-ports[Run command with the service's ports enabled and mapped to the host.]" \
'-T[Disable pseudo-tty allocation. By default `docker-compose run` allocates a TTY.]' \
'(-):services:__docker-compose_services' \