From 1c197db45bc95b44849b6bf8f03daec11728f71a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Thu, 24 May 2018 23:17:00 +0200 Subject: [PATCH] Make image name overrideable --- debian-here.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian-here.sh b/debian-here.sh index 43886a6..b2863ad 100755 --- a/debian-here.sh +++ b/debian-here.sh @@ -12,17 +12,19 @@ popd() { command popd "$@" > /dev/null; } here="$(pwd)" script_dir="$(dirname "$(readlink -f "$0")")" +IMAGE="${IMAGE:-debian-here}" + run() { if [[ ! -z "${BUILD:-}" ]];then pushd "$script_dir" - docker build -t debian-here . + docker build -t "$IMAGE" . popd exit fi mount_point="/mnt/$(basename "$here")" - docker run --rm -ti -v "$here":"$mount_point" -w "$mount_point" ${ARGS:-} debian-here "$@" + docker run --rm -ti -v "$here":"$mount_point" -w "$mount_point" ${ARGS:-} "$IMAGE" "$@" } run "$@"