diff --git a/docker/bash.sh b/docker/bash.sh index b04270d0a819..a5dec23f91ad 100755 --- a/docker/bash.sh +++ b/docker/bash.sh @@ -38,9 +38,11 @@ set -euo pipefail function show_usage() { cat < [--] [COMMAND] + [--cpus NUM_CPUS] [--mount MOUNT_DIR] + [--repo-mount-point REPO_MOUNT_POINT] + [--dry-run] [--name NAME] + [--] [COMMAND] + -h, --help @@ -54,6 +56,10 @@ Usage: docker/bash.sh [-i|--interactive] [--net=host] [-t|--tty] Start the docker session with a pseudo terminal (tty). +--cpus NUM_CPUS + + Limit the number of CPU cores to be used. + --net=host Expose servers run into the container to the host, passing the @@ -184,6 +190,11 @@ while (( $# )); do eval $break_joined_flag ;; + --cpus) + DOCKER_FLAGS+=(--cpus "$2") + shift 2 + ;; + --net=host) USE_NET_HOST=true shift