From 78a88c1857c8c66943a09e310df6ddc731719cfb Mon Sep 17 00:00:00 2001 From: a14stoner <59861665+a14stoner@users.noreply.github.com> Date: Sun, 19 Mar 2023 16:04:34 +0100 Subject: [PATCH] fix: Failed to open X display when restarting container (#790) * Update docker-entrypoint.sh fix error: what(): Failed to open X display by deleting the .X99-lock file at the start of the containe * Update docker-entrypoint.sh add check - if the file .X99-lock exists it will be removed. If not nothing is done. * Update docker-entrypoint.sh Change check and deletion to a one-liner --- docker-entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 7c0b1e38c..63f9c3f9e 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,6 +1,7 @@ #!/bin/sh if ! which -- "${1}"; then # first arg is not an executable + if [ -e /tmp/.X99-lock ]; then rm /tmp/.X99-lock -f; fi export DISPLAY=:99 Xvfb "${DISPLAY}" -nolisten unix & exec node /usr/src/app/ "$@"