From 5f1f6b0b7a85aee590387473f212b47a4dc244c8 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 3 May 2022 11:12:57 +0100 Subject: [PATCH] Allow changing the docker image name for in-docker.sh runs (#348) --- scripts/in-docker.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/in-docker.sh b/scripts/in-docker.sh index bde4325..51de702 100755 --- a/scripts/in-docker.sh +++ b/scripts/in-docker.sh @@ -1,8 +1,10 @@ #!/bin/bash -docker inspect element-desktop-dockerbuild 2> /dev/null > /dev/null +IMAGE=${DOCKER_IMAGE_NAME:-"element-desktop-dockerbuild"} + +docker inspect "$IMAGE" 2> /dev/null > /dev/null if [ $? != 0 ]; then - echo "Docker image element-desktop-dockerbuild not found. Have you run yarn run docker:setup?" + echo "Docker image $IMAGE not found. Have you run yarn run docker:setup?" exit 1 fi @@ -18,4 +20,4 @@ docker run --rm -ti \ -v ${PWD}/docker/.gnupg:/root/.gnupg \ -v ~/.cache/electron:/root/.cache/electron \ -v ~/.cache/electron-builder:/root/.cache/electron-builder \ - element-desktop-dockerbuild "$@" + "$IMAGE" "$@"