add docker -it option when tty is enabled
@@ -87,7 +87,8 @@ USER_ID=$(id -u)
GROUP_ID=$(id -g)
# Shared docker options
PYTHONPATHS="-e PYTHONPATH=/home/blueoil:/home/blueoil/lmnet:/home/blueoil/dlk/python/dlk"
-SHARED_DOCKER_OPTIONS="--rm -t -u ${USER_ID}:${GROUP_ID} ${PYTHONPATHS}"
+DOCKER_TTY_OPTION=$(tty > /dev/null 2>&1 && echo "-it" || echo "-t")
+SHARED_DOCKER_OPTIONS="--rm ${DOCKER_TTY_OPTION} -u ${USER_ID}:${GROUP_ID} ${PYTHONPATHS}"
function blueoil_init(){
CONFIG_DIR=${ABS_BASE_DIR}/config
