Allow changing the docker image name for in-docker.sh runs (#348)

This commit is contained in:
Michael Telatynski 2022-05-03 11:12:57 +01:00 committed by GitHub
parent 03c6345735
commit 5f1f6b0b7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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