Skip to content

Commit

Permalink
fix: Failed to open X display when restarting container (#790)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
a14stoner authored Mar 19, 2023
1 parent 5aaa43a commit 78a88c1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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/ "$@"
Expand Down

0 comments on commit 78a88c1

Please sign in to comment.