diff --git a/Dockerfile b/Dockerfile index 7040381..35bc8c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -127,8 +127,10 @@ RUN \ export DISPLAY=$display; \ mkdir -p --mode=777 /tmp/.X11-unix; \ # Create job for waiting for Xvfb to start - { inotifywait -e create /tmp/.X11-unix/ 2>&1 > /dev/null & }; \ + watchStarting="$(mktemp)"; \ + { 2>&1 inotifywait -e create /tmp/.X11-unix/; } | { sed -u -e "/^Watches established.\$/e rm \"$watchStarting\""; } & \ resolver=$!; \ + while [ -f "$watchStarting" ]; do true; done; \ { \ # Improve arguments for screenshots ARGS=$([ $DEBUG -eq 1 ] && echo "-screen 0 640x480x24 -dpi 192" || echo ""); \