Skip to content

Commit

Permalink
envsetup: Add a flag to launch docker with or without pseudo-tty
Browse files Browse the repository at this point in the history
Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed Jan 29, 2020
1 parent 5b129a4 commit b3c3f6c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand Down
7 changes: 7 additions & 0 deletions local.sh.example
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b3c3f6c

Please sign in to comment.