conditionally set interactive and tty on dokku run.

closes #552
closes #913
This commit is contained in:
Michael Hobbs
2015-01-21 13:49:31 -08:00
parent 40d1f22d74
commit 3e100e3002
2 changed files with 19 additions and 1 deletions

View File

@@ -49,7 +49,9 @@ case "$1" in
shift 2
DOCKER_ARGS=$(: | pluginhook docker-args $APP run)
docker run -i -t $DOCKER_ARGS $IMAGE /exec "$@"
# if we have a prompt, then we have a tty according to the LDP (http://www.tldp.org/LDP/abs/html/intandnonint.html)
[[ ! -z "$PS1" ]] && DOKKU_RUN_OPTS="-i -t"
docker run $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE /exec "$@"
;;
url | urls)