diff --git a/utils/docker-run b/utils/docker-run new file mode 100755 index 0000000000..0614f1325d --- /dev/null +++ b/utils/docker-run @@ -0,0 +1,10 @@ +#!/usr/bin/bash +set -o errexit -o pipefail +DIR=$(dirname "${0}") +MAIN_DIR=$(readlink -f "${DIR}/..") +# shellcheck disable=SC2016 +IMAGE=$(grep ^image: "${MAIN_DIR}/.gitlab-ci.yml" | \ + sed -e 's,^image: ,,g' | sed -e 's,\$CI_REGISTRY,registry.gitlab.com,g') + +set -x +exec docker run -v "${MAIN_DIR}:/home/br-user" -t "${IMAGE}" "$@"