Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit a8adc84

Browse files
committed
Fix race condition when launching websockify.
Summary of issue #18: noVNC's launch.sh invokes `ps`. Without it, it exits prematurely, thus ruining websockify's stdout and stderr file descriptors. Depending on how fast websockify starts up, this may or may not prevent it from working.
1 parent 6d52beb commit a8adc84

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

NodeBase/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ RUN apt-get -qqy update \
9494
########################################
9595
# Download https://github.com/novnc/noVNC dated 2021-03-30 commit 84f102d6a9ffaf3972693d59bad5c6fddb6d7fb0
9696
# Download https://github.com/novnc/websockify dated 2021-03-22 commit c5d365dd1dbfee89881f1c1c02a2ac64838d645f
97+
# Install procps as noVNC's launch.sh depends on it to launch websockify properly
9798
ENV NOVNC_SHA="84f102d6a9ffaf3972693d59bad5c6fddb6d7fb0" \
9899
WEBSOCKIFY_SHA="c5d365dd1dbfee89881f1c1c02a2ac64838d645f"
99100
RUN wget -nv -O noVNC.zip \
@@ -107,7 +108,11 @@ RUN wget -nv -O noVNC.zip \
107108
&& unzip -x websockify.zip \
108109
&& rm websockify.zip \
109110
&& rm -rf websockify-${WEBSOCKIFY_SHA}/tests \
110-
&& mv websockify-${WEBSOCKIFY_SHA} /opt/bin/noVNC/utils/websockify
111+
&& mv websockify-${WEBSOCKIFY_SHA} /opt/bin/noVNC/utils/websockify \
112+
&& apt-get -qqy update \
113+
&& apt-get -qqy --no-install-recommends install procps \
114+
&& rm -rf /var/lib/apt/lists/* \
115+
&& apt-get -qqy clean
111116

112117
#=========================================================================================================================================
113118
# Run this command for executable file permissions for /dev/shm when this is a "child" container running in Docker Desktop and WSL2 distro

0 commit comments

Comments
 (0)