diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 7c0b1e3..ba08bd2 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -2,7 +2,8 @@ if ! which -- "${1}"; then # first arg is not an executable export DISPLAY=:99 - Xvfb "${DISPLAY}" -nolisten unix & + # Launch Xvfb if needed + xdpyinfo --display "${DISPLAY}" >/dev/null 2>&1 || Xvfb "${DISPLAY}" -nolisten unix & exec node /usr/src/app/ "$@" fi