Start Xvfb before doing anything else
This commit is contained in:
parent
08cb65dbcc
commit
a8f6db8ba9
26
Dockerfile
26
Dockerfile
|
@ -32,6 +32,19 @@ RUN \
|
|||
installerExtension=".exe"; \
|
||||
installer="$(mktemp --suffix="$installerExtension")"; \
|
||||
installerName="$(basename "$installer" | sed "s/$installerExtension$//")"; \
|
||||
export DISPLAY=:90; \
|
||||
mkdir -p --mode=777 /tmp/.X11-unix; \
|
||||
# Create job for waiting for Xvfb to start
|
||||
watchStarting="$(mktemp)"; \
|
||||
{ 2>&1 inotifywait -e create /tmp/.X11-unix/; } | { sed -u -e "/^Watches established.\$/e rm \"$watchStarting\""; } & \
|
||||
displayResolver="$!"; \
|
||||
while [ -f "$watchStarting" ]; do true; done; \
|
||||
{ \
|
||||
# Improve arguments for screenshots
|
||||
ARGS="$([ $DEBUG -eq 1 ] && echo "-screen 0 640x480x24 -dpi 192" || echo "")"; \
|
||||
Xvfb "${DISPLAY}" ${ARGS} & \
|
||||
}; \
|
||||
displayPID="$!"; \
|
||||
rm "$installer"; \
|
||||
wget "${KEIL_URL}" --progress=bar:force:noscroll -O "$installer"; \
|
||||
[ "$DEBUG" -eq 1 ] && { \
|
||||
|
@ -153,19 +166,6 @@ RUN \
|
|||
kill_installer() { \
|
||||
pkill -9 "$installerName" > /dev/null 2>&1; \
|
||||
}; \
|
||||
export DISPLAY=:90; \
|
||||
mkdir -p --mode=777 /tmp/.X11-unix; \
|
||||
# Create job for waiting for Xvfb to start
|
||||
watchStarting="$(mktemp)"; \
|
||||
{ 2>&1 inotifywait -e create /tmp/.X11-unix/; } | { sed -u -e "/^Watches established.\$/e rm \"$watchStarting\""; } & \
|
||||
displayResolver="$!"; \
|
||||
while [ -f "$watchStarting" ]; do true; done; \
|
||||
{ \
|
||||
# Improve arguments for screenshots
|
||||
ARGS="$([ $DEBUG -eq 1 ] && echo "-screen 0 640x480x24 -dpi 192" || echo "")"; \
|
||||
Xvfb "${DISPLAY}" ${ARGS} & \
|
||||
}; \
|
||||
displayPID="$!"; \
|
||||
# Wait for Xvfb to start
|
||||
wait "$displayResolver"; \
|
||||
/usr/bin/entrypoint wine reg add 'HKLM\Software\Wine\winedbg' /V ShowCrashDialog /T REG_DWORD /D 0; \
|
||||
|
|
Loading…
Reference in a new issue