kumquat-buildroot/utils/docker-run

11 lines
338 B
Plaintext
Raw Normal View History

#!/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}" "$@"