Skip to content

Commit

Permalink
update kasm compatibility for DRI3 and fix substitution in nginx init
Browse files Browse the repository at this point in the history
  • Loading branch information
thelamer committed Mar 16, 2023
1 parent 3c5a372 commit 01ccb5e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ RUN \
cd /build-out && \
rm *.md && \
rm AUTHORS && \
cp index.html vnc.html
cp index.html vnc.html && \
mkdir Downloads

FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage

Expand Down Expand Up @@ -334,6 +335,7 @@ RUN \
| tar xzvf - -C /kasmbins/ && \
chmod +x /kasmbins/* && \
chown -R 1000:1000 /kasmbins && \
chown 1000:1000 /usr/share/kasmvnc/www/Downloads && \
echo "**** dind support ****" && \
addgroup -S dockremap && \
adduser -S -G dockremap dockremap && \
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ RUN \
cd /build-out && \
rm *.md && \
rm AUTHORS && \
cp index.html vnc.html
cp index.html vnc.html && \
mkdir Downloads

FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17 as buildstage

Expand Down Expand Up @@ -337,6 +338,7 @@ RUN \
| tar xzvf - -C /kasmbins/ && \
chmod +x /kasmbins/* && \
chown -R 1000:1000 /kasmbins && \
chown 1000:1000 /usr/share/kasmvnc/www/Downloads && \
echo "**** dind support ****" && \
addgroup -S dockremap && \
adduser -S -G dockremap dockremap && \
Expand Down
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/init-nginx/run
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ sed -i "s/3000/$CPORT/g" ${NGINX_CONFIG}
sed -i "s/3001/$CHPORT/g" ${NGINX_CONFIG}
if [ ! -z ${PASSWORD+x} ]; then
printf "${CUSER}:$(openssl passwd -apr1 ${PASSWORD})\n" > /etc/nginx/.htpasswd
sed -i 's/#//g' /etc/nginx/http.d/default.conf
sed -i 's/#//g' ${NGINX_CONFIG}
fi
9 changes: 9 additions & 0 deletions root/kasminit
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ set -e
export HOME=/home/kasm-user
export KASM_VNC_PATH=/usr/share/kasmvnc
export PULSE_RUNTIME_PATH=/var/run/pulse
if [ -z ${DRINODE+x} ]; then
DRINODE="/dev/dri/renderD128"
fi
KASMNVC_HW3D=''
if [ ! -z ${HW3D+x} ]; then
KASMVNC_HW3D="-hw3d"
fi

## Directory setup for home folder ##
# Create folders for upload/download
Expand Down Expand Up @@ -66,6 +73,8 @@ openssl req -x509 \
-subj "/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=kasm/[email protected]"
# Start KasmVNC
vncserver $DISPLAY \
$KASMVNC_HW3D \
-drinode $DRINODE \
-websocketPort 6901 \
-httpd ${KASM_VNC_PATH}/www \
-FrameRate=60 \
Expand Down

0 comments on commit 01ccb5e

Please sign in to comment.