Skip to content

Commit 05484d8

Browse files
Crow-ControlCopilot
andcommitted
more kasmvnc tweaking
Co-authored-by: Copilot <copilot@github.com>
1 parent 475c351 commit 05484d8

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

apps/kasmvnc/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ ENV DISPLAY=:1 \
231231
GOMP_SPINCOUNT=0 \
232232
HOME=/config \
233233
START_DOCKER=true \
234-
PULSE_RUNTIME_PATH=/defaults \
234+
PULSE_RUNTIME_PATH=/tmp/pulse \
235235
NVIDIA_DRIVER_CAPABILITIES=all
236236

237237
# copy over build output
@@ -247,7 +247,8 @@ RUN \
247247
build-essential \
248248
libpulse-dev && \
249249
cd /kclient && \
250-
npm rebuild && \
250+
HOME=/tmp/npm-home npm rebuild && \
251+
rm -rf /tmp/npm-home /config/.cache /config/.npm 2>/dev/null || true && \
251252
apt-get remove -y build-essential && \
252253
apt-get autoremove -y && \
253254
apt-get clean && \
@@ -273,6 +274,8 @@ RUN \
273274
libjpeg-turbo8 \
274275
libnotify-bin \
275276
libstdc++6 \
277+
libcpuid18 \
278+
libtbb12 \
276279
libwebp7 \
277280
libxfont2 \
278281
libxshmfence1 \
@@ -317,6 +320,11 @@ RUN \
317320
mkdir -p /var/log/nginx && \
318321
chown -R apps:apps /var/log/nginx && \
319322
sed -i 's|pid /run/nginx.pid;|pid /tmp/nginx.pid;|g' /etc/nginx/nginx.conf && \
323+
sed -i \
324+
-e 's|error_log /var/log/nginx/error.log;|error_log /tmp/nginx-error.log;|g' \
325+
-e 's|access_log /var/log/nginx/access.log;|access_log /tmp/nginx-access.log;|g' \
326+
-e 's|include /etc/nginx/conf.d/\*.conf;|include /etc/nginx/conf.d/*.conf;\n\tinclude /tmp/nginx-conf.d/*.conf;|g' \
327+
/etc/nginx/nginx.conf && \
320328
echo "**** openbox tweaks ****" && \
321329
sed -i \
322330
-e 's/NLIMC/NLMC/g' \

apps/kasmvnc/start.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,9 @@ if [ ! -z ${PASSWORD+x} ]; then
100100
sed -i "s|/etc/nginx/.htpasswd|/tmp/nginx/.htpasswd|g" ${NGINX_CONFIG}
101101
fi
102102

103-
# Copy nginx config to the right place if writable
104-
if [ -w /etc/nginx/conf.d/ ]; then
105-
cp ${NGINX_CONFIG} /etc/nginx/conf.d/default.conf
106-
elif [ -d /etc/nginx/http.d/ ] && [ -w /etc/nginx/http.d/ ]; then
107-
cp ${NGINX_CONFIG} /etc/nginx/http.d/default.conf
108-
fi
103+
# Copy nginx config to a writable location (rootfs may be read-only)
104+
mkdir -p /tmp/nginx-conf.d
105+
cp ${NGINX_CONFIG} /tmp/nginx-conf.d/default.conf
109106

110107
# Set DISPLAY for X server
111108
export DISPLAY=:1
@@ -158,7 +155,7 @@ if pgrep -f "[n]ginx:" >/dev/null; then
158155
fi
159156

160157
# Start nginx in background
161-
if [ -f /etc/nginx/conf.d/default.conf ] || [ -f /etc/nginx/http.d/default.conf ] || [ -f ${NGINX_CONFIG} ]; then
158+
if [ -f /tmp/nginx-conf.d/default.conf ]; then
162159
/usr/sbin/nginx -g 'daemon off;' -c /etc/nginx/nginx.conf &
163160
fi
164161

0 commit comments

Comments
 (0)