Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <raj.khem@gmail.com>
kraj committed Jan 29, 2020
1 parent 5b129a4 commit 9b14a22
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
@@ -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 \
echo docker run --rm -i $PSEUDO_TTY \
-v $(pwd):$(pwd) \
-v ~/.ssh:/home/build/.ssh \
-v ~/.gitconfig:/home/build/.gitconfig \
7 changes: 7 additions & 0 deletions local.sh.example
Original file line number Diff line number Diff line change
@@ -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 9b14a22

Please sign in to comment.