From a0f2a8a747add60c3b1e7fee85a55e85aeea37f9 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Mon, 16 Dec 2024 23:48:52 +0100 Subject: [PATCH] fix(scripts): Use the default image root when running Docker Use the same image root that `docker_build.sh` uses by default. Signed-off-by: Sebastian Schuberth --- scripts/docker_run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/docker_run.sh b/scripts/docker_run.sh index fe7f32fe6921b..0f5326ced2fee 100755 --- a/scripts/docker_run.sh +++ b/scripts/docker_run.sh @@ -29,10 +29,11 @@ DOCKER_ARGS=$1 shift 2> /dev/null ORT_ARGS=$@ +DOCKER_IMAGE_ROOT="${DOCKER_IMAGE_ROOT:-ghcr.io/oss-review-toolkit}" DOCKER_RUN_AS_USER="-v /etc/group:/etc/group:ro -v /etc/passwd:/etc/passwd:ro -v $HOME:$HOME -u $(id -u):$(id -g)" [ -n "$http_proxy" ] && HTTP_PROXY_ENV="-e http_proxy" [ -n "$https_proxy" ] && HTTPS_PROXY_ENV="-e https_proxy" # Mount the project root into the image to run the command task from there. -docker run $DOCKER_ARGS $DOCKER_RUN_AS_USER $HTTP_PROXY_ENV $HTTPS_PROXY_ENV -v $PWD:/workdir -w /workdir ort $ORT_ARGS +docker run $DOCKER_ARGS $DOCKER_RUN_AS_USER $HTTP_PROXY_ENV $HTTPS_PROXY_ENV -v $PWD:/workdir -w /workdir $DOCKER_IMAGE_ROOT/ort $ORT_ARGS