diff --git a/plugins/00_dokku-standard/commands b/plugins/00_dokku-standard/commands index 9c1819ee5..9358641a4 100755 --- a/plugins/00_dokku-standard/commands +++ b/plugins/00_dokku-standard/commands @@ -49,8 +49,8 @@ case "$1" in shift 2 DOCKER_ARGS=$(: | pluginhook docker-args $APP run) - # 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" + [[ "$(/usr/bin/tty || true)" != "not a tty" ]] && DOKKU_RUN_OPTS="-i -t" + docker run $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE /exec "$@" ;;