diff --git a/envsetup.sh b/envsetup.sh index 0e405acea..0254df888 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -474,6 +474,12 @@ dkr() { else shift fi + if [ "$DOCKER_PSEUDO_TTY" = "no" ]; then + PSEUDO_TTY="" + else + PSEUDO_TTY="-t" + fi + SSH_AUTH_DIR=~/ unset MAP_DL_DIR @@ -487,7 +493,7 @@ dkr() { SSH_AUTH_DIR=$(readlink -f $SSH_AUTH_SOCK) fi - docker run --rm -it \ + docker run --rm -i $PSEUDO_TTY \ -v $(pwd):$(pwd) \ -v ~/.ssh:/home/build/.ssh \ -v ~/.gitconfig:/home/build/.gitconfig \ diff --git a/local.sh.example b/local.sh.example index 27163ca8f..9720a196a 100644 --- a/local.sh.example +++ b/local.sh.example @@ -18,3 +18,10 @@ # configure docker container to run bitbake in #export DOCKER_REPO=yoedistro/yoe-build:buster + +# Flag to control docker launch with pseudo-tty +# when output is piped or redirected to files then +# then docker should be launched without tty +# otherwise it will emit all control characters into +# redirected log files, default is 'yes' +#export DOCKER_PSEUDO_TTY=no