[base image files] All 'docker exec' wrapper scripts now dynamically adjust their flags depending on whether or not they are run on a terminal (#1507)

This commit is contained in:
Joe LeVeque
2018-03-17 00:43:29 -07:00
committed by lguohan
parent 066137e9d8
commit e1cb2ace36
7 changed files with 61 additions and 7 deletions

View File

@@ -1,3 +1,10 @@
#!/bin/bash
docker exec -i teamd teamdctl "$@"
DOCKER_EXEC_FLAGS="i"
# Determine whether stdout is on a terminal
if [ -t 1 ] ; then
DOCKER_EXEC_FLAGS+="t"
fi
docker exec -$DOCKER_EXEC_FLAGS teamd teamdctl "$@"