Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docker] Re-enabled automatic --tty flag when running bash. #8861

Merged
merged 1 commit into from
Sep 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docker/bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ set -euo pipefail

function show_usage() {
cat <<EOF
Usage: docker/bash.sh [-i|--interactive] [--net=host]
Usage: docker/bash.sh [-i|--interactive] [--net=host] [-t|--tty]
[--mount MOUNT_DIR] [--repo-mount-point REPO_MOUNT_POINT]
[--dry-run]
<DOCKER_IMAGE_NAME> [--] [COMMAND]
Expand Down Expand Up @@ -95,7 +95,7 @@ DOCKER_IMAGE_NAME
COMMAND

The command to be run inside the docker container. If this is set
to "bash", both the --interactive and --net=host flags are set.
to "bash", the --interactive, --tty and --net=host flags are set.
If no command is specified, defaults to "bash". If the command
contains dash-prefixed arguments, the command should be preceded
by -- to indicate arguments that are not intended for bash.sh.
Expand Down Expand Up @@ -235,6 +235,7 @@ fi

if [[ ${COMMAND[@]+"${COMMAND[@]}"} = bash ]]; then
INTERACTIVE=true
TTY=true
USE_NET_HOST=true
fi

Expand Down