Skip to content

Commit a5e252c

Browse files
authored
fix: install dependencies for websockify utils in novnc (#2443)
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 3290a30 commit a5e252c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Base/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ RUN --mount=type=secret,id=SEL_PASSWD \
6060
supervisor \
6161
gnupg2 \
6262
libnss3-tools \
63+
python3-pip \
6364
openjdk-${JRE_VERSION}-jre-headless \
6465
&& if [ "${TARGETARCH}" = "arm" ] && [ "${TARGETVARIANT}" = "v7" ]; then \
6566
export ARCH=armhf ; \

NodeBase/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ RUN --mount=type=secret,id=SEL_PASSWD \
104104
&& apt-get -qyy autoremove \
105105
&& rm -rf /var/lib/apt/lists/* \
106106
&& apt-get -qyy clean \
107+
&& pip install --no-cache-dir --upgrade --break-system-packages setuptools \
107108
########################################
108109
# noVNC exposes VNC through a web page #
109110
########################################
@@ -117,9 +118,16 @@ RUN --mount=type=secret,id=SEL_PASSWD \
117118
"https://github.com/novnc/websockify/archive/refs/${WEBSOCKIFY_SOURCE}/${WEBSOCKIFY_VERSION}.zip" \
118119
&& unzip -x websockify.zip \
119120
&& rm websockify.zip \
120-
&& mv websockify-${WEBSOCKIFY_VERSION} /opt/bin/noVNC/utils/websockify \
121+
# Setup dependencies
122+
&& cd websockify-${WEBSOCKIFY_VERSION} \
123+
&& python3 setup.py install \
124+
# Move websockify and run to the noVNC directory
125+
&& mv websockify /opt/bin/noVNC/utils/websockify \
126+
&& mv run /opt/bin/noVNC/utils/websockify \
121127
&& chmod +x /opt/bin/noVNC/utils/websockify/run \
122-
&& rm -rf /opt/bin/noVNC/utils/websockify/docker /opt/bin/noVNC/utils/websockify/tests \
128+
# Cleanup unnecessary files
129+
&& cd .. \
130+
&& rm -rf websockify-${WEBSOCKIFY_VERSION} \
123131
#========================================================================
124132
# Run this command for executable file permissions for /dev/shm when #
125133
# this is a "child" container running in Docker Desktop and WSL2 distro #

0 commit comments

Comments
 (0)