mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-01 06:21:56 -09:00
utils/docker-run: allow IMAGE to be passed in the environment
It is sometimes useful to use docker-run, but with a different image than the default one. This commit allows to override the image being used by only defining IMAGE if not already passed in the environment. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> [yann.morin.1998@free.fr: s/\t/ /g] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
3b877dc7c2
commit
80a1e728b0
@@ -9,9 +9,11 @@ else
|
|||||||
# Support git-worktree
|
# Support git-worktree
|
||||||
GIT_DIR="$(cd "${MAIN_DIR}" && git rev-parse --no-flags --git-common-dir)"
|
GIT_DIR="$(cd "${MAIN_DIR}" && git rev-parse --no-flags --git-common-dir)"
|
||||||
fi
|
fi
|
||||||
# shellcheck disable=SC2016
|
if test -z "${IMAGE}" ; then
|
||||||
IMAGE=$(grep ^image: "${MAIN_DIR}/.gitlab-ci.yml" | \
|
# shellcheck disable=SC2016
|
||||||
sed -e 's,^image: ,,g' | sed -e 's,\$CI_REGISTRY,registry.gitlab.com,g')
|
IMAGE=$(grep ^image: "${MAIN_DIR}/.gitlab-ci.yml" | \
|
||||||
|
sed -e 's,^image: ,,g' | sed -e 's,\$CI_REGISTRY,registry.gitlab.com,g')
|
||||||
|
fi
|
||||||
|
|
||||||
declare -a docker_opts=(
|
declare -a docker_opts=(
|
||||||
-i
|
-i
|
||||||
|
|||||||
Reference in New Issue
Block a user