It is useful to adjust the command line when running the docker image, for example to attach a data volume or a ccache directory. Add e mechanism to do that. Message-Id: <20181228163306.19439-1-avi@scylladb.com>
18 lines
416 B
Bash
Executable File
18 lines
416 B
Bash
Executable File
#!/bin/bash
|
|
|
|
docker_args=()
|
|
|
|
if [[ "$1" = -* ]]; then
|
|
while [[ "$1" != "--" && $# != 0 ]]; do
|
|
docker_args+=("$1")
|
|
shift
|
|
done
|
|
if [[ "$1" != "--" ]]; then
|
|
echo "Expected '--' to terminate docker flag list"
|
|
exit 1
|
|
fi
|
|
shift
|
|
fi
|
|
|
|
docker run --sig-proxy=true --rm -u "$(id -u):$(id -g)" --cap-add SYS_PTRACE -v "$PWD:$PWD" -v /tmp:/tmp -w "$PWD" "${docker_args[@]}" "$(<tools/toolchain/image)" "$@"
|