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 "$@"