mirror of
https://github.com/kasmtech/workspaces-core-images.git
synced 2024-11-21 23:13:08 +01:00
KASM-4083 merge develop add debug guard
This commit is contained in:
commit
5893fcd97b
@ -11,7 +11,7 @@ stages:
|
||||
|
||||
variables:
|
||||
DOCKER_AUTH_CONFIG: ${_DOCKER_AUTH_CONFIG}
|
||||
KASM_RELEASE: "1.12.0"
|
||||
KASM_RELEASE: "1.13.0"
|
||||
|
||||
before_script:
|
||||
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
|
||||
@ -90,7 +90,7 @@ build_debian_bullseye:
|
||||
# prep the buildx env
|
||||
- docker buildx create --use
|
||||
# build for multiple architectures
|
||||
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-debian-bullseye-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-debian-bullseye-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-debian-bullseye:$SANITIZED_BRANCH -t ${ORG_NAME}/core-debian-bullseye:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="debian:bullseye" --build-arg DISTRO="debian" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_debian.svg -f dockerfile-kasm-core .
|
||||
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-debian-bullseye-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-debian-bullseye-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-debian-bullseye:$SANITIZED_BRANCH -t ${ORG_NAME}/core-debian-bullseye:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="debian:bullseye-slim" --build-arg DISTRO="debian" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_debian.svg -f dockerfile-kasm-core .
|
||||
only:
|
||||
- develop
|
||||
- /^release\/.*$/
|
||||
@ -112,6 +112,8 @@ build_cuda_focal:
|
||||
- /^release\/.*$/
|
||||
except:
|
||||
- schedules
|
||||
tags:
|
||||
- aws-autoscale
|
||||
|
||||
build_remnux_focal:
|
||||
stage: build
|
||||
@ -473,7 +475,7 @@ build_debian_bullseye_dev:
|
||||
docker build
|
||||
-t ${ORG_NAME}/core-debian-bullseye-private:$(arch)-$SANITIZED_BRANCH
|
||||
--build-arg START_PULSEAUDIO=1
|
||||
--build-arg BASE_IMAGE="debian:bullseye"
|
||||
--build-arg BASE_IMAGE="debian:bullseye-slim"
|
||||
--build-arg DISTRO="debian"
|
||||
--build-arg START_XFCE4=1
|
||||
--build-arg BG_IMG=bg_debian.svg
|
||||
@ -810,7 +812,7 @@ build_alpine_317_dev:
|
||||
test_multi_arch_dev:
|
||||
stage: test
|
||||
script:
|
||||
- docker pull ${ORG_NAME}/kasm-tester:1.12.0
|
||||
- docker pull ${ORG_NAME}/kasm-tester:1.13.0
|
||||
- >
|
||||
docker run --rm --privileged
|
||||
-e KASM_PORT=443
|
||||
@ -826,7 +828,7 @@ test_multi_arch_dev:
|
||||
-e S3_BUCKET=kasm-ci
|
||||
-e COMMIT=${CI_COMMIT_SHA}
|
||||
-e REPO=workspaces-core-images
|
||||
${ORG_NAME}/kasm-tester:1.12.0
|
||||
${ORG_NAME}/kasm-tester:1.13.0
|
||||
except:
|
||||
- develop
|
||||
- /^release\/.*$/
|
||||
@ -857,7 +859,7 @@ test_multi_arch_dev:
|
||||
test_single_arch_dev:
|
||||
stage: test
|
||||
script:
|
||||
- docker pull ${ORG_NAME}/kasm-tester:1.12.0
|
||||
- docker pull ${ORG_NAME}/kasm-tester:1.13.0
|
||||
- >
|
||||
docker run --rm --privileged
|
||||
-e KASM_PORT=443
|
||||
@ -873,7 +875,7 @@ test_single_arch_dev:
|
||||
-e S3_BUCKET=kasm-ci
|
||||
-e COMMIT=${CI_COMMIT_SHA}
|
||||
-e REPO=workspaces-core-images
|
||||
${ORG_NAME}/kasm-tester:1.12.0
|
||||
${ORG_NAME}/kasm-tester:1.13.0
|
||||
except:
|
||||
- develop
|
||||
- /^release\/.*$/
|
||||
@ -952,6 +954,8 @@ link_tests_single_arch_dev:
|
||||
except:
|
||||
- develop
|
||||
- /^release\/.*$/
|
||||
tags:
|
||||
- aws-autoscale-nano
|
||||
parallel:
|
||||
matrix:
|
||||
- KASM_IMAGE:
|
||||
@ -971,6 +975,8 @@ link_tests_multi_arch_dev:
|
||||
except:
|
||||
- develop
|
||||
- /^release\/.*$/
|
||||
tags:
|
||||
- aws-autoscale-nano
|
||||
parallel:
|
||||
matrix:
|
||||
- ARCH: [ aarch64, x86_64 ]
|
||||
@ -1054,7 +1060,7 @@ build_debian_bullseye_scheduled:
|
||||
# prep the buildx env
|
||||
- docker buildx create --use
|
||||
# build for multiple architectures
|
||||
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-debian-bullseye-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-debian-bullseye:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="debian:bullseye" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_debian.svg --build-arg DISTRO="debian" -f dockerfile-kasm-core .
|
||||
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-debian-bullseye-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-debian-bullseye:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="debian:bullseye-slim" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_debian.svg --build-arg DISTRO="debian" -f dockerfile-kasm-core .
|
||||
only:
|
||||
- schedules
|
||||
tags:
|
||||
|
@ -1,66 +1,37 @@
|
||||
#### Build Stage ####
|
||||
ARG BASE_IMAGE="ubuntu:20.04"
|
||||
FROM $BASE_IMAGE AS install_tools
|
||||
ARG DISTRO=ubuntu
|
||||
|
||||
LABEL "org.opencontainers.image.authors"='Kasm Tech "info@kasmweb.com"'
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
LABEL "com.kasmweb.gpu_acceleration_egl"="nvidia"
|
||||
FROM $BASE_IMAGE AS base_layer
|
||||
|
||||
### Environment config
|
||||
ARG START_XFCE4=0
|
||||
ARG START_PULSEAUDIO=0
|
||||
ARG BG_IMG=bg_kasm.png
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG DISTRO=ubuntu
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ENV DISPLAY=:1 \
|
||||
VNC_PORT=5901 \
|
||||
NO_VNC_PORT=6901 \
|
||||
VNC_PORT=5901 \
|
||||
AUDIO_PORT=4901 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
MAX_FRAME_RATE=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
DISTRO=$DISTRO \
|
||||
HOME=/home/kasm-default-profile \
|
||||
TERM=xterm \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||
LD_LIBRARY_PATH=/opt/libjpeg-turbo/lib64/:/usr/local/lib/ \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
SHELL=/bin/bash \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
|
||||
|
||||
EXPOSE $VNC_PORT \
|
||||
$NO_VNC_PORT \
|
||||
$UPLOAD_PORT \
|
||||
$AUDIO_PORT
|
||||
STARTUPDIR=/dockerstartup
|
||||
|
||||
### Home setup
|
||||
WORKDIR $HOME
|
||||
RUN mkdir -p $HOME/Desktop
|
||||
|
||||
# Support NVIDIA gpus for graphics acceleration
|
||||
### Support NVIDIA gpus for graphics acceleration
|
||||
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
|
||||
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
|
||||
ENV LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
|
||||
ENV NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics,compat32,utility
|
||||
COPY src/ubuntu/install/nvidia/10_nvidia.json /usr/share/glvnd/egl_vendor.d/10_nvidia.json
|
||||
|
||||
### Setup package rules
|
||||
COPY ./src/ubuntu/install/package_rules $INST_SCRIPTS/package_rules/
|
||||
RUN bash $INST_SCRIPTS/package_rules/package_rules.sh && rm -rf $INST_SCRIPTS/package_rules/
|
||||
|
||||
### Install common tools
|
||||
COPY ./src/ubuntu/install/tools $INST_SCRIPTS/tools/
|
||||
RUN bash $INST_SCRIPTS/tools/install_tools.sh && rm -rf $INST_SCRIPTS/tools/
|
||||
@ -93,7 +64,6 @@ COPY ./src/common/install/kasm_vnc/kasmvnc.yaml /etc/kasmvnc/
|
||||
COPY ./src/ubuntu/install/kasm_upload_server $INST_SCRIPTS/kasm_upload_server/
|
||||
RUN bash $INST_SCRIPTS/kasm_upload_server/install_kasm_upload_server.sh && rm -rf $INST_SCRIPTS/kasm_upload_server/
|
||||
|
||||
|
||||
### Install Audio
|
||||
COPY ./src/ubuntu/install/audio $INST_SCRIPTS/audio/
|
||||
RUN bash $INST_SCRIPTS/audio/install_audio.sh && rm -rf $INST_SCRIPTS/audio/
|
||||
@ -124,7 +94,6 @@ RUN chown proxy:proxy /usr/local/squid/share/icons/SN.png
|
||||
COPY ./src/ubuntu/install/squid/resources/error_message/access_denied.html /usr/local/squid/share/errors/en/ERR_ACCESS_DENIED
|
||||
RUN chown proxy:proxy /usr/local/squid/share/errors/en/ERR_ACCESS_DENIED
|
||||
RUN rm -rf $INST_SCRIPTS/resources/
|
||||
|
||||
RUN chmod +x /etc/squid/kasm_squid_adapter
|
||||
RUN chmod +x /etc/squid/start_squid.sh && chmod 4755 /etc/squid/start_squid.sh
|
||||
|
||||
@ -142,11 +111,15 @@ RUN bash $INST_SCRIPTS/extra/$EXTRA_SH && rm -rf $INST_SCRIPTS/extra/
|
||||
COPY ./src/ubuntu/install/virtualgl $INST_SCRIPTS/virtualgl/
|
||||
RUN bash $INST_SCRIPTS/virtualgl/install_virtualgl.sh && rm -rf $INST_SCRIPTS/virtualgl/
|
||||
|
||||
### Sysbox support
|
||||
COPY ./src/ubuntu/install/sysbox $INST_SCRIPTS/sysbox/
|
||||
RUN bash $INST_SCRIPTS/sysbox/install_systemd.sh && rm -rf $INST_SCRIPTS/sysbox/
|
||||
|
||||
### Create user and home directory for base images that don't already define it
|
||||
RUN (groupadd -g 1000 kasm-user \
|
||||
&& useradd -M -u 1000 -g 1000 kasm-user \
|
||||
&& usermod -a -G kasm-user kasm-user) ; exit 0
|
||||
ENV HOME /home/kasm-user
|
||||
ENV HOME=/home/kasm-user
|
||||
WORKDIR $HOME
|
||||
RUN mkdir -p $HOME && chown -R 1000:0 $HOME
|
||||
|
||||
@ -177,6 +150,67 @@ RUN touch $STARTUPDIR/wm.log \
|
||||
&& chown 1000:root /var/run/pulse \
|
||||
&& rm -Rf /home/kasm-default-profile/.launchpadlib
|
||||
|
||||
### Cleanup job
|
||||
COPY ./src/ubuntu/install/cleanup $INST_SCRIPTS/cleanup/
|
||||
RUN bash $INST_SCRIPTS/cleanup/cleanup.sh && rm -rf $INST_SCRIPTS/cleanup/
|
||||
|
||||
#### Runtime Stage ####
|
||||
FROM scratch
|
||||
COPY --from=base_layer / /
|
||||
|
||||
### Labels
|
||||
LABEL "org.opencontainers.image.authors"='Kasm Tech "info@kasmweb.com"'
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
LABEL "com.kasmweb.gpu_acceleration_egl"="nvidia"
|
||||
|
||||
### Environment config
|
||||
ARG DISTRO=ubuntu
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ARG START_PULSEAUDIO=1
|
||||
ARG START_XFCE4=1
|
||||
ENV AUDIO_PORT=4901 \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
DISPLAY=:1 \
|
||||
DISTRO=$DISTRO \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
HOME=/home/kasm-user \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
LD_LIBRARY_PATH=/opt/libjpeg-turbo/lib64/:/usr/local/lib/ \
|
||||
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}:/usr/local/nvidia/lib:/usr/local/nvidia/lib64 \
|
||||
MAX_FRAME_RATE=24 \
|
||||
NO_VNC_PORT=6901 \
|
||||
NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics,compat32,utility \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7" \
|
||||
SHELL=/bin/bash \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
TERM=xterm \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword
|
||||
|
||||
### Ports and user
|
||||
EXPOSE $VNC_PORT \
|
||||
$NO_VNC_PORT \
|
||||
$UPLOAD_PORT \
|
||||
$AUDIO_PORT
|
||||
WORKDIR $HOME
|
||||
USER 1000
|
||||
|
||||
ENTRYPOINT ["/dockerstartup/kasm_default_profile.sh", "/dockerstartup/vnc_startup.sh", "/dockerstartup/kasm_startup.sh"]
|
||||
|
@ -1,9 +1,8 @@
|
||||
#### Build Stage ####
|
||||
ARG BASE_IMAGE="alpine:3.17"
|
||||
|
||||
FROM $BASE_IMAGE AS install_tools
|
||||
ARG DISTRO=alpine
|
||||
|
||||
|
||||
### Install common tools
|
||||
RUN apk add --no-cache bash
|
||||
COPY ./src/ubuntu/install/tools $INST_SCRIPTS/tools/
|
||||
@ -11,65 +10,31 @@ RUN bash "$INST_SCRIPTS/tools/install_tools.sh" && rm -rf "$INST_SCRIPTS/tools/"
|
||||
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||
|
||||
FROM install_tools AS squid_builder
|
||||
|
||||
ARG DISTRO=alpine
|
||||
|
||||
RUN ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g') && \
|
||||
wget --progress=dot:giga "https://kasmweb-build-artifacts.s3.amazonaws.com/kasm-squid-builder/f2b6ac26e7f91240e57d6d6e1dad4cc2704445ee/output/kasm-squid-builder_alpine_${ARCH}.tar.gz"
|
||||
RUN tar -xzf kasm-squid-builder_*.tar.gz -C /
|
||||
|
||||
FROM install_tools
|
||||
|
||||
MAINTAINER Kasm Tech "info@kasmweb.com"
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
FROM install_tools as base_layer
|
||||
|
||||
### Environment config
|
||||
ARG START_XFCE4=1
|
||||
ARG START_PULSEAUDIO=1
|
||||
ARG BG_IMG=bg_alpine.png
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG DISTRO=alpine
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ENV DISPLAY=:1 \
|
||||
VNC_PORT=5901 \
|
||||
NO_VNC_PORT=6901 \
|
||||
VNC_PORT=5901 \
|
||||
AUDIO_PORT=4901 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
MAX_FRAME_RATE=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
ENV DISTRO=$DISTRO \
|
||||
HOME=/home/kasm-default-profile \
|
||||
TERM=xterm \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
PERL5LIB=/usr/local/bin \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
SHELL=/bin/bash \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
SINGLE_APPLICATION=0 \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
|
||||
|
||||
EXPOSE $VNC_PORT \
|
||||
$NO_VNC_PORT \
|
||||
$UPLOAD_PORT \
|
||||
$AUDIO_PORT
|
||||
STARTUPDIR=/dockerstartup
|
||||
|
||||
### Home setup
|
||||
WORKDIR $HOME
|
||||
RUN mkdir -p $HOME/Desktop
|
||||
|
||||
@ -174,6 +139,70 @@ RUN touch $STARTUPDIR/wm.log \
|
||||
&& chown -R root:root /usr/local/bin \
|
||||
&& chown 1000:root /var/run/pulse
|
||||
|
||||
### Language Packs
|
||||
COPY ./src/ubuntu/install/langpacks $INST_SCRIPTS/langpacks/
|
||||
RUN bash $INST_SCRIPTS/langpacks/install_langpacks.sh && rm -rf $INST_SCRIPTS/langpacks/
|
||||
|
||||
### Cleanup Job
|
||||
COPY ./src/ubuntu/install/cleanup $INST_SCRIPTS/cleanup/
|
||||
RUN bash $INST_SCRIPTS/cleanup/cleanup.sh && rm -rf $INST_SCRIPTS/cleanup/
|
||||
|
||||
#### Runtime Stage ####
|
||||
FROM scratch
|
||||
COPY --from=base_layer / /
|
||||
|
||||
### Labels
|
||||
LABEL "org.opencontainers.image.authors"='Kasm Tech "info@kasmweb.com"'
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
|
||||
### Environment config
|
||||
ARG DISTRO=alpine
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ARG START_PULSEAUDIO=1
|
||||
ARG START_XFCE4=1
|
||||
ENV AUDIO_PORT=4901 \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
DISPLAY=:1 \
|
||||
DISTRO=$DISTRO \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
HOME=/home/kasm-user \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
MAX_FRAME_RATE=24 \
|
||||
NO_VNC_PORT=6901 \
|
||||
NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics,compat32,utility \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
PERL5LIB=/usr/local/bin \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7" \
|
||||
SHELL=/bin/bash \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
TERM=xterm \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword
|
||||
|
||||
### Ports and user
|
||||
EXPOSE $VNC_PORT \
|
||||
$NO_VNC_PORT \
|
||||
$UPLOAD_PORT \
|
||||
$AUDIO_PORT
|
||||
WORKDIR $HOME
|
||||
USER 1000
|
||||
|
||||
ENTRYPOINT ["/dockerstartup/kasm_default_profile.sh", "/dockerstartup/vnc_startup.sh", "/dockerstartup/kasm_startup.sh"]
|
||||
|
@ -1,10 +1,14 @@
|
||||
#### Build Stage ####
|
||||
ARG BASE_IMAGE="centos:centos7"
|
||||
|
||||
FROM $BASE_IMAGE AS install_tools
|
||||
ARG DISTRO=centos
|
||||
|
||||
### Install common tools
|
||||
### Setup package rules
|
||||
COPY ./src/ubuntu/install/package_rules $INST_SCRIPTS/package_rules/
|
||||
RUN bash $INST_SCRIPTS/package_rules/package_rules.sh && rm -rf $INST_SCRIPTS/package_rules/
|
||||
|
||||
### Install common tools
|
||||
COPY ./src/ubuntu/install/tools $INST_SCRIPTS/tools/
|
||||
RUN bash "$INST_SCRIPTS/tools/install_tools.sh" && rm -rf "$INST_SCRIPTS/tools/"
|
||||
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||
@ -14,56 +18,26 @@ FROM install_tools AS squid_builder
|
||||
RUN wget --progress=dot:giga 'https://kasmweb-build-artifacts.s3.amazonaws.com/kasm-squid-builder/de1dffbc94d4132d6c696de8c6dfcd6f08900f61/output/kasm-squid-builder_centos_amd64.tar.gz'
|
||||
RUN tar -xzf kasm-squid-builder_centos_amd64.tar.gz -C /
|
||||
|
||||
FROM install_tools
|
||||
|
||||
MAINTAINER Kasm Tech "info@kasmweb.com"
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
FROM install_tools as base_layer
|
||||
|
||||
### Environment config
|
||||
ARG START_XFCE4=0
|
||||
ARG START_PULSEAUDIO=0
|
||||
ARG BG_IMG=bg_centos.png
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG DISTRO=centos
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ENV DISPLAY=:1 \
|
||||
VNC_PORT=5901 \
|
||||
NO_VNC_PORT=6901 \
|
||||
VNC_PORT=5901 \
|
||||
AUDIO_PORT=4901 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
MAX_FRAME_RATE=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
HOME=/home/kasm-default-profile \
|
||||
ENV HOME=/home/kasm-default-profile \
|
||||
TERM=xterm \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
SHELL=/bin/bash \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
SINGLE_APPLICATION=0 \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
|
||||
|
||||
EXPOSE $VNC_PORT \
|
||||
$NO_VNC_PORT \
|
||||
$UPLOAD_PORT \
|
||||
$AUDIO_PORT
|
||||
DISTRO=$DISTRO
|
||||
|
||||
WORKDIR $HOME
|
||||
RUN mkdir -p $HOME/Desktop
|
||||
@ -176,6 +150,65 @@ RUN touch $STARTUPDIR/wm.log \
|
||||
&& chown -R root:root /usr/local/bin \
|
||||
&& chown 1000:root /var/run/pulse
|
||||
|
||||
### Cleanup job
|
||||
COPY ./src/ubuntu/install/cleanup $INST_SCRIPTS/cleanup/
|
||||
RUN bash $INST_SCRIPTS/cleanup/cleanup.sh && rm -rf $INST_SCRIPTS/cleanup/
|
||||
|
||||
#### Runtime Stage ####
|
||||
FROM scratch
|
||||
COPY --from=base_layer / /
|
||||
|
||||
### Labels
|
||||
LABEL "org.opencontainers.image.authors"='Kasm Tech "info@kasmweb.com"'
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
|
||||
### Environment config
|
||||
ARG DISTRO=centos
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ARG START_PULSEAUDIO=1
|
||||
ARG START_XFCE4=1
|
||||
ENV AUDIO_PORT=4901 \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
DISPLAY=:1 \
|
||||
DISTRO=$DISTRO \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
HOME=/home/kasm-user \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
MAX_FRAME_RATE=24 \
|
||||
NO_VNC_PORT=6901 \
|
||||
NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics,compat32,utility \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7" \
|
||||
SHELL=/bin/bash \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
TERM=xterm \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword
|
||||
|
||||
### Ports and user
|
||||
EXPOSE $VNC_PORT \
|
||||
$NO_VNC_PORT \
|
||||
$UPLOAD_PORT \
|
||||
$AUDIO_PORT
|
||||
WORKDIR $HOME
|
||||
USER 1000
|
||||
|
||||
ENTRYPOINT ["/dockerstartup/kasm_default_profile.sh", "/dockerstartup/vnc_startup.sh", "/dockerstartup/kasm_startup.sh"]
|
||||
|
@ -1,11 +1,13 @@
|
||||
#### Build Stage ####
|
||||
ARG BASE_IMAGE="fedora:37"
|
||||
|
||||
FROM $BASE_IMAGE AS install_tools
|
||||
ARG DISTRO=fedora37
|
||||
|
||||
### Setup package rules
|
||||
COPY ./src/ubuntu/install/package_rules $INST_SCRIPTS/package_rules/
|
||||
RUN bash $INST_SCRIPTS/package_rules/package_rules.sh && rm -rf $INST_SCRIPTS/package_rules/
|
||||
|
||||
### Install common tools
|
||||
|
||||
COPY ./src/ubuntu/install/tools $INST_SCRIPTS/tools/
|
||||
RUN bash "$INST_SCRIPTS/tools/install_tools.sh" && rm -rf "$INST_SCRIPTS/tools/"
|
||||
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||
@ -18,56 +20,28 @@ RUN ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g') && \
|
||||
wget --progress=dot:giga "https://kasmweb-build-artifacts.s3.amazonaws.com/kasm-squid-builder/1149fc830c7edcb383eec390cce2beba16befde5/output/kasm-squid-builder_${ARCH}.tar.gz"
|
||||
RUN tar -xzf kasm-squid-builder_*.tar.gz -C /
|
||||
|
||||
FROM install_tools
|
||||
FROM install_tools as base_layer
|
||||
|
||||
MAINTAINER Kasm Tech "info@kasmweb.com"
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
|
||||
### Environment config
|
||||
ARG START_XFCE4=1
|
||||
ARG START_PULSEAUDIO=1
|
||||
ARG BG_IMG=bg_fedora.png
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG DISTRO=fedora37
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ENV DISPLAY=:1 \
|
||||
VNC_PORT=5901 \
|
||||
NO_VNC_PORT=6901 \
|
||||
VNC_PORT=5901 \
|
||||
AUDIO_PORT=4901 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
MAX_FRAME_RATE=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
HOME=/home/kasm-default-profile \
|
||||
ENV HOME=/home/kasm-default-profile \
|
||||
TERM=xterm \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
SHELL=/bin/bash \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
SINGLE_APPLICATION=0 \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
|
||||
|
||||
EXPOSE $VNC_PORT \
|
||||
$NO_VNC_PORT \
|
||||
$UPLOAD_PORT \
|
||||
$AUDIO_PORT
|
||||
DISTRO=$DISTRO
|
||||
|
||||
WORKDIR $HOME
|
||||
RUN mkdir -p $HOME/Desktop
|
||||
@ -180,6 +154,64 @@ RUN touch $STARTUPDIR/wm.log \
|
||||
&& chown -R root:root /usr/local/bin \
|
||||
&& chown 1000:root /var/run/pulse
|
||||
|
||||
### Cleanup job
|
||||
COPY ./src/ubuntu/install/cleanup $INST_SCRIPTS/cleanup/
|
||||
RUN bash $INST_SCRIPTS/cleanup/cleanup.sh && rm -rf $INST_SCRIPTS/cleanup/
|
||||
|
||||
#### Runtime Stage ####
|
||||
FROM scratch
|
||||
COPY --from=base_layer / /
|
||||
|
||||
### Labels
|
||||
LABEL "org.opencontainers.image.authors"='Kasm Tech "info@kasmweb.com"'
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
|
||||
### Environment config
|
||||
ARG DISTRO=fedora37
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ARG START_PULSEAUDIO=1
|
||||
ARG START_XFCE4=1
|
||||
ENV AUDIO_PORT=4901 \
|
||||
DISPLAY=:1 \
|
||||
DISTRO=$DISTRO \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
HOME=/home/kasm-user \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
MAX_FRAME_RATE=24 \
|
||||
NO_VNC_PORT=6901 \
|
||||
NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics,compat32,utility \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7" \
|
||||
SHELL=/bin/bash \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
TERM=xterm \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword
|
||||
|
||||
### Ports and user
|
||||
EXPOSE $VNC_PORT \
|
||||
$NO_VNC_PORT \
|
||||
$UPLOAD_PORT \
|
||||
$AUDIO_PORT
|
||||
WORKDIR $HOME
|
||||
USER 1000
|
||||
|
||||
ENTRYPOINT ["/dockerstartup/kasm_default_profile.sh", "/dockerstartup/vnc_startup.sh", "/dockerstartup/kasm_startup.sh"]
|
||||
|
@ -1,11 +1,13 @@
|
||||
#### Build Stage ####
|
||||
ARG BASE_IMAGE="oraclelinux:8"
|
||||
|
||||
FROM $BASE_IMAGE AS install_tools
|
||||
ARG DISTRO=oracle8
|
||||
|
||||
### Setup package rules
|
||||
COPY ./src/ubuntu/install/package_rules $INST_SCRIPTS/package_rules/
|
||||
RUN bash $INST_SCRIPTS/package_rules/package_rules.sh && rm -rf $INST_SCRIPTS/package_rules/
|
||||
|
||||
### Install common tools
|
||||
|
||||
COPY ./src/ubuntu/install/tools $INST_SCRIPTS/tools/
|
||||
RUN bash "$INST_SCRIPTS/tools/install_tools.sh" && rm -rf "$INST_SCRIPTS/tools/"
|
||||
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||
@ -23,56 +25,29 @@ else \
|
||||
fi
|
||||
RUN tar -xzf kasm-squid-builder_*.tar.gz -C /
|
||||
|
||||
FROM install_tools
|
||||
FROM install_tools as base_layer
|
||||
|
||||
MAINTAINER Kasm Tech "info@kasmweb.com"
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
|
||||
### Environment config
|
||||
ARG START_XFCE4=0
|
||||
ARG START_PULSEAUDIO=0
|
||||
ARG BG_IMG=bg_oracle.png
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG DISTRO=oracle8
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ENV DISPLAY=:1 \
|
||||
VNC_PORT=5901 \
|
||||
NO_VNC_PORT=6901 \
|
||||
VNC_PORT=5901 \
|
||||
AUDIO_PORT=4901 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
MAX_FRAME_RATE=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
HOME=/home/kasm-default-profile \
|
||||
ENV HOME=/home/kasm-default-profile \
|
||||
TERM=xterm \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
SHELL=/bin/bash \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
SINGLE_APPLICATION=0 \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
|
||||
|
||||
EXPOSE $VNC_PORT \
|
||||
$NO_VNC_PORT \
|
||||
$UPLOAD_PORT \
|
||||
$AUDIO_PORT
|
||||
DISTRO=$DISTRO
|
||||
|
||||
WORKDIR $HOME
|
||||
RUN mkdir -p $HOME/Desktop
|
||||
@ -160,6 +135,10 @@ RUN bash $STARTUPDIR/set_user_permission.sh $STARTUPDIR $HOME && \
|
||||
COPY ./src/ubuntu/install/extra $INST_SCRIPTS/extra/
|
||||
RUN bash $INST_SCRIPTS/extra/$EXTRA_SH && rm -rf $INST_SCRIPTS/extra/
|
||||
|
||||
### Sysbox support
|
||||
COPY ./src/ubuntu/install/sysbox $INST_SCRIPTS/sysbox/
|
||||
RUN bash $INST_SCRIPTS/sysbox/install_systemd.sh && rm -rf $INST_SCRIPTS/sysbox/
|
||||
|
||||
### Create user and home directory for base images that don't already define it
|
||||
RUN (groupadd -g 1000 kasm-user \
|
||||
&& useradd -M -u 1000 -g 1000 kasm-user \
|
||||
@ -194,6 +173,64 @@ RUN touch $STARTUPDIR/wm.log \
|
||||
&& chown -R root:root /usr/local/bin \
|
||||
&& chown 1000:root /var/run/pulse
|
||||
|
||||
### Cleanup job
|
||||
COPY ./src/ubuntu/install/cleanup $INST_SCRIPTS/cleanup/
|
||||
RUN bash $INST_SCRIPTS/cleanup/cleanup.sh && rm -rf $INST_SCRIPTS/cleanup/
|
||||
|
||||
#### Runtime Stage ####
|
||||
FROM scratch
|
||||
COPY --from=base_layer / /
|
||||
|
||||
### Labels
|
||||
LABEL "org.opencontainers.image.authors"='Kasm Tech "info@kasmweb.com"'
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
|
||||
### Environment config
|
||||
ARG DISTRO=oracle8
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ARG START_PULSEAUDIO=1
|
||||
ARG START_XFCE4=1
|
||||
ENV AUDIO_PORT=4901 \
|
||||
DISPLAY=:1 \
|
||||
DISTRO=$DISTRO \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
HOME=/home/kasm-user \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
MAX_FRAME_RATE=24 \
|
||||
NO_VNC_PORT=6901 \
|
||||
NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics,compat32,utility \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7" \
|
||||
SHELL=/bin/bash \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
TERM=xterm \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword
|
||||
|
||||
### Ports and user
|
||||
EXPOSE $VNC_PORT \
|
||||
$NO_VNC_PORT \
|
||||
$UPLOAD_PORT \
|
||||
$AUDIO_PORT
|
||||
WORKDIR $HOME
|
||||
USER 1000
|
||||
|
||||
ENTRYPOINT ["/dockerstartup/kasm_default_profile.sh", "/dockerstartup/vnc_startup.sh", "/dockerstartup/kasm_startup.sh"]
|
||||
|
@ -1,4 +1,5 @@
|
||||
ARG BASE_IMAGE="opensuse/leap:15"
|
||||
#### Build Stage ####
|
||||
ARG BASE_IMAGE="opensuse/leap:15.3"
|
||||
|
||||
FROM $BASE_IMAGE AS install_tools
|
||||
ARG DISTRO=opensuse
|
||||
@ -18,56 +19,26 @@ RUN ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g') && \
|
||||
wget --progress=dot:giga "https://kasmweb-build-artifacts.s3.amazonaws.com/kasm-squid-builder/1149fc830c7edcb383eec390cce2beba16befde5/output/kasm-squid-builder_${ARCH}.tar.gz"
|
||||
RUN tar -xzf kasm-squid-builder_*.tar.gz -C /
|
||||
|
||||
FROM install_tools
|
||||
|
||||
MAINTAINER Kasm Tech "info@kasmweb.com"
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
FROM install_tools as base_layer
|
||||
|
||||
### Environment config
|
||||
ARG START_XFCE4=0
|
||||
ARG START_PULSEAUDIO=0
|
||||
ARG BG_IMG=bg_opensuse.png
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG DISTRO=opensuse
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ENV DISPLAY=:1 \
|
||||
VNC_PORT=5901 \
|
||||
NO_VNC_PORT=6901 \
|
||||
VNC_PORT=5901 \
|
||||
AUDIO_PORT=4901 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
MAX_FRAME_RATE=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
HOME=/home/kasm-default-profile \
|
||||
ENV HOME=/home/kasm-default-profile \
|
||||
TERM=xterm \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
SHELL=/bin/bash \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
SINGLE_APPLICATION=0 \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
|
||||
|
||||
EXPOSE $VNC_PORT \
|
||||
$NO_VNC_PORT \
|
||||
$UPLOAD_PORT \
|
||||
$AUDIO_PORT
|
||||
DISTRO=$DISTRO
|
||||
|
||||
WORKDIR $HOME
|
||||
RUN mkdir -p $HOME/Desktop
|
||||
@ -139,6 +110,10 @@ RUN bash $STARTUPDIR/set_user_permission.sh $STARTUPDIR $HOME && \
|
||||
COPY ./src/ubuntu/install/extra $INST_SCRIPTS/extra/
|
||||
RUN bash $INST_SCRIPTS/extra/$EXTRA_SH && rm -rf $INST_SCRIPTS/extra/
|
||||
|
||||
### Sysbox support
|
||||
COPY ./src/ubuntu/install/sysbox $INST_SCRIPTS/sysbox/
|
||||
RUN bash $INST_SCRIPTS/sysbox/install_systemd.sh && rm -rf $INST_SCRIPTS/sysbox/
|
||||
|
||||
### Create user and home directory for base images that don't already define it
|
||||
RUN (groupadd -g 1000 kasm-user \
|
||||
&& useradd -M -u 1000 -g 1000 kasm-user \
|
||||
@ -173,6 +148,62 @@ RUN touch $STARTUPDIR/wm.log \
|
||||
&& chown -R root:root /usr/local/bin \
|
||||
&& chown 1000:root /var/run/pulse
|
||||
|
||||
### Language Packs
|
||||
COPY ./src/ubuntu/install/langpacks $INST_SCRIPTS/langpacks/
|
||||
RUN bash $INST_SCRIPTS/langpacks/install_langpacks.sh && rm -rf $INST_SCRIPTS/langpacks/
|
||||
|
||||
### Cleanup Job
|
||||
COPY ./src/ubuntu/install/cleanup $INST_SCRIPTS/cleanup/
|
||||
RUN bash $INST_SCRIPTS/cleanup/cleanup.sh && rm -rf $INST_SCRIPTS/cleanup/
|
||||
|
||||
#### Runtime Stage ####
|
||||
FROM scratch
|
||||
COPY --from=base_layer / /
|
||||
|
||||
### Labels
|
||||
LABEL "org.opencontainers.image.authors"='Kasm Tech "info@kasmweb.com"'
|
||||
LABEL "com.kasmweb.image"="true"
|
||||
|
||||
### Environment config
|
||||
ARG DISTRO=opensuse
|
||||
ARG EXTRA_SH=noop.sh
|
||||
ARG LANG='en_US.UTF-8'
|
||||
ARG LANGUAGE='en_US:en'
|
||||
ARG LC_ALL='en_US.UTF-8'
|
||||
ARG START_PULSEAUDIO=1
|
||||
ARG START_XFCE4=1
|
||||
ENV AUDIO_PORT=4901 \
|
||||
DISPLAY=:1 \
|
||||
DISTRO=$DISTRO \
|
||||
GOMP_SPINCOUNT=0 \
|
||||
HOME=/home/kasm-user \
|
||||
INST_SCRIPTS=/dockerstartup/install \
|
||||
KASMVNC_AUTO_RECOVER=true \
|
||||
KASM_VNC_PATH=/usr/share/kasmvnc \
|
||||
LANG=$LANG \
|
||||
LANGUAGE=$LANGUAGE \
|
||||
LC_ALL=$LC_ALL \
|
||||
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||
MAX_FRAME_RATE=24 \
|
||||
NO_VNC_PORT=6901 \
|
||||
NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics,compat32,utility \
|
||||
OMP_WAIT_POLICY=PASSIVE \
|
||||
PULSE_RUNTIME_PATH=/var/run/pulse \
|
||||
SDL_GAMECONTROLLERCONFIG="030000005e040000be02000014010000,XInput Controller,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b16,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:b12,dpdown:b13,dpleft:b14,dpright:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7" \
|
||||
SHELL=/bin/bash \
|
||||
START_PULSEAUDIO=$START_PULSEAUDIO \
|
||||
STARTUPDIR=/dockerstartup \
|
||||
START_XFCE4=$START_XFCE4 \
|
||||
TERM=xterm \
|
||||
VNC_COL_DEPTH=24 \
|
||||
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7 -DLP_ClipDelay=0" \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PORT=5901 \
|
||||
VNC_PW=vncpassword \
|
||||
VNC_RESOLUTION=1280x1024 \
|
||||
VNC_RESOLUTION=1280x720 \
|
||||
VNC_VIEW_ONLY_PW=vncviewonlypassword
|
||||
|
||||
USER 1000
|
||||
|
||||
ENTRYPOINT ["/dockerstartup/kasm_default_profile.sh", "/dockerstartup/vnc_startup.sh", "/dockerstartup/kasm_startup.sh"]
|
||||
|
@ -4,6 +4,12 @@ set -e
|
||||
|
||||
no_proxy="localhost,127.0.0.1"
|
||||
|
||||
# Set lang values
|
||||
if [ "${LC_ALL}" != "en_US.UTF-8" ]; then
|
||||
export LANG=${LC_ALL}
|
||||
export LANGUAGE=${LC_ALL}
|
||||
fi
|
||||
|
||||
# dict to store processes
|
||||
declare -A KASM_PROCS
|
||||
|
||||
@ -62,12 +68,12 @@ function start_kasmvnc (){
|
||||
|| echo "no locks present"
|
||||
fi
|
||||
|
||||
rm -rf $HOME/.vnc/*.pid
|
||||
echo "exit 0" > $HOME/.vnc/xstartup
|
||||
chmod +x $HOME/.vnc/xstartup
|
||||
rm -rf $HOME/.vnc/*.pid
|
||||
echo "exit 0" > $HOME/.vnc/xstartup
|
||||
chmod +x $HOME/.vnc/xstartup
|
||||
|
||||
VNCOPTIONS="$VNCOPTIONS -select-de manual"
|
||||
if [[ "${BUILD_ARCH}" =~ ^aarch64$ ]] && [[ -f /lib/aarch64-linux-gnu/libgcc_s.so.1 ]] ; then
|
||||
VNCOPTIONS="$VNCOPTIONS -select-de manual"
|
||||
if [[ "${BUILD_ARCH}" =~ ^aarch64$ ]] && [[ -f /lib/aarch64-linux-gnu/libgcc_s.so.1 ]] ; then
|
||||
LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.so.1 vncserver $DISPLAY $KASMVNC_HW3D -drinode $DRINODE -depth $VNC_COL_DEPTH -geometry $VNC_RESOLUTION -websocketPort $NO_VNC_PORT -httpd ${KASM_VNC_PATH}/www -sslOnly -FrameRate=$MAX_FRAME_RATE -interface 0.0.0.0 -BlacklistThreshold=0 -FreeKeyMappings $VNCOPTIONS $KASM_SVC_SEND_CUT_TEXT $KASM_SVC_ACCEPT_CUT_TEXT
|
||||
else
|
||||
vncserver $DISPLAY $KASMVNC_HW3D -drinode $DRINODE -depth $VNC_COL_DEPTH -geometry $VNC_RESOLUTION -websocketPort $NO_VNC_PORT -httpd ${KASM_VNC_PATH}/www -sslOnly -FrameRate=$MAX_FRAME_RATE -interface 0.0.0.0 -BlacklistThreshold=0 -FreeKeyMappings $VNCOPTIONS $KASM_SVC_SEND_CUT_TEXT $KASM_SVC_ACCEPT_CUT_TEXT
|
||||
@ -75,6 +81,16 @@ function start_kasmvnc (){
|
||||
|
||||
KASM_PROCS['kasmvnc']=$(cat $HOME/.vnc/*${DISPLAY_NUM}.pid)
|
||||
|
||||
#Disable X11 Screensaver
|
||||
if [ "${DISTRO}" != "alpine" ]; then
|
||||
echo "Disabling X Screensaver Functionality"
|
||||
xset -dpms
|
||||
xset s off
|
||||
xset q
|
||||
else
|
||||
echo "Disabling of X Screensaver Functionality for $DISTRO is not required."
|
||||
fi
|
||||
|
||||
if [[ $DEBUG == true ]]; then
|
||||
echo -e "\n------------------ Started Websockify ----------------------------"
|
||||
echo "Websockify PID: ${KASM_PROCS['kasmvnc']}";
|
||||
@ -185,7 +201,11 @@ function start_gamepad (){
|
||||
function start_webcam (){
|
||||
if [[ ${KASM_SVC_WEBCAM:-1} == 1 ]] && [[ -e /dev/video0 ]]; then
|
||||
echo 'Starting webcam server'
|
||||
$STARTUPDIR/webcam/kasm_webcam_server --debug --port 4905 --ssl --cert ${HOME}/.vnc/self.pem --certkey ${HOME}/.vnc/self.pem &
|
||||
if [[ $DEBUG == true ]]; then
|
||||
$STARTUPDIR/webcam/kasm_webcam_server --debug --port 4905 --ssl --cert ${HOME}/.vnc/self.pem --certkey ${HOME}/.vnc/self.pem &
|
||||
else
|
||||
$STARTUPDIR/webcam/kasm_webcam_server --port 4905 --ssl --cert ${HOME}/.vnc/self.pem --certkey ${HOME}/.vnc/self.pem &
|
||||
fi
|
||||
|
||||
KASM_PROCS['kasm_webcam']=$!
|
||||
|
||||
|
@ -9,36 +9,30 @@ if [[ "${DISTRO}" == @(centos|oracle7) ]] ; then
|
||||
yum install -y epel-release
|
||||
yum localinstall -y --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
|
||||
yum install -y ffmpeg pulseaudio-utils
|
||||
yum remove -y pulseaudio-module-bluetooth
|
||||
sed -i '/Bluetooth/,+7d' /etc/pulse/default.pa
|
||||
elif [ "${DISTRO}" == "oracle8" ]; then
|
||||
dnf install -y curl git
|
||||
dnf config-manager --set-enabled ol8_codeready_builder
|
||||
dnf localinstall -y --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
|
||||
dnf install -y ffmpeg pulseaudio-utils
|
||||
dnf clean all
|
||||
elif [ "${DISTRO}" == "oracle9" ]; then
|
||||
dnf install -y curl git
|
||||
dnf config-manager --set-enabled ol9_codeready_builder
|
||||
dnf localinstall -y --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm
|
||||
dnf install -y --allowerasing ffmpeg pulseaudio-utils pulseaudio
|
||||
dnf clean all
|
||||
elif [[ "${DISTRO}" == @(rockylinux9|almalinux9) ]]; then
|
||||
dnf localinstall -y --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm
|
||||
dnf install -y --allowerasing ffmpeg pulseaudio-utils pulseaudio
|
||||
dnf clean all
|
||||
elif [[ "${DISTRO}" == @(rockylinux8|almalinux8) ]]; then
|
||||
dnf localinstall -y --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
|
||||
dnf install -y --allowerasing ffmpeg pulseaudio-utils pulseaudio
|
||||
dnf clean all
|
||||
elif [ "${DISTRO}" == "fedora37" ]; then
|
||||
dnf install -y curl git
|
||||
dnf localinstall -y --nogpgcheck https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-37.noarch.rpm
|
||||
dnf install -y --allowerasing ffmpeg pulseaudio pulseaudio-utils
|
||||
dnf clean all
|
||||
elif [ "${DISTRO}" == "opensuse" ]; then
|
||||
zypper install -ny curl git
|
||||
zypper install -yn ffmpeg pulseaudio-utils
|
||||
zypper clean --all
|
||||
elif [ "${DISTRO}" == "alpine" ]; then
|
||||
apk add --no-cache \
|
||||
ffmpeg \
|
||||
|
56
src/ubuntu/install/cleanup/cleanup.sh
Normal file
56
src/ubuntu/install/cleanup/cleanup.sh
Normal file
@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
# Distro package cleanup
|
||||
if [[ "${DISTRO}" == @(centos|oracle7) ]] ; then
|
||||
yum clean all
|
||||
elif [[ "${DISTRO}" == @(almalinux8|almalinux9|fedora37|oracle8|oracle9|rockylinux8|rockylinux9) ]]; then
|
||||
dnf clean all
|
||||
elif [ "${DISTRO}" == "opensuse" ]; then
|
||||
zypper clean --all
|
||||
elif [[ "${DISTRO}" == @(debian|kali|parrotos5|ubuntu) ]]; then
|
||||
apt-get autoremove -y
|
||||
apt-get autoclean -y
|
||||
fi
|
||||
|
||||
# File cleanups
|
||||
rm -Rf \
|
||||
/home/kasm-default-profile/.cache \
|
||||
/home/kasm-user/.cache \
|
||||
/tmp \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/*
|
||||
mkdir -m 1777 /tmp
|
||||
|
||||
# Services we don't want to start disable in xfce init
|
||||
rm -f \
|
||||
/etc/xdg/autostart/blueman.desktop \
|
||||
/etc/xdg/autostart/geoclue-demo-agent.desktop \
|
||||
/etc/xdg/autostart/gnome-keyring-pkcs11.desktop \
|
||||
/etc/xdg/autostart/gnome-keyring-secrets.desktop \
|
||||
/etc/xdg/autostart/gnome-keyring-ssh.desktop \
|
||||
/etc/xdg/autostart/gnome-shell-overrides-migration.desktop \
|
||||
/etc/xdg/autostart/light-locker.desktop \
|
||||
/etc/xdg/autostart/org.gnome.Evolution-alarm-notify.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.A11ySettings.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.Color.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.Datetime.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.Housekeeping.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.Keyboard.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.MediaKeys.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.Power.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.PrintNotifications.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.Rfkill.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.ScreensaverProxy.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.Sharing.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.Smartcard.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.Sound.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.UsbProtection.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.Wacom.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.Wwan.desktop \
|
||||
/etc/xdg/autostart/org.gnome.SettingsDaemon.XSettings.desktop \
|
||||
/etc/xdg/autostart/pulseaudio.desktop \
|
||||
/etc/xdg/autostart/xfce4-power-manager.desktop \
|
||||
/etc/xdg/autostart/xfce4-screensaver.desktop \
|
||||
/etc/xdg/autostart/xfce-polkit.desktop \
|
||||
/etc/xdg/autostart/xscreensaver.desktop
|
@ -15,11 +15,3 @@ fi
|
||||
apt-get update
|
||||
apt-get install -y salt-common
|
||||
git clone https://github.com/REMnux/salt-states.git /srv/salt
|
||||
|
||||
# Cleanup
|
||||
apt-get autoclean
|
||||
rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/tmp/*
|
||||
|
||||
|
@ -2,25 +2,88 @@
|
||||
### every exit != 0 fails the script
|
||||
set -e
|
||||
|
||||
echo "Installing ttf-wqy-zenhei"
|
||||
if [[ "${DISTRO}" == @(centos|oracle7) ]]; then
|
||||
yum install -y wqy-zenhei-fonts
|
||||
elif [[ "${DISTRO}" == @(fedora37|oracle8|oracle9|rockylinux9|rockylinux8|almalinux9|almalinux8) ]]; then
|
||||
dnf install -y google-noto-sans-fonts
|
||||
dnf clean all
|
||||
LOCALES_RHEL="glibc-langpack-aa glibc-langpack-af glibc-langpack-agr glibc-langpack-ak glibc-langpack-am glibc-langpack-an glibc-langpack-anp glibc-langpack-ar glibc-langpack-as glibc-langpack-ast glibc-langpack-ayc glibc-langpack-az glibc-langpack-be glibc-langpack-bem glibc-langpack-ber glibc-langpack-bg glibc-langpack-bhb glibc-langpack-bho glibc-langpack-bi glibc-langpack-bn glibc-langpack-bo glibc-langpack-br glibc-langpack-brx glibc-langpack-bs glibc-langpack-byn glibc-langpack-ca glibc-langpack-ce glibc-langpack-chr glibc-langpack-cmn glibc-langpack-crh glibc-langpack-cs glibc-langpack-csb glibc-langpack-cv glibc-langpack-cy glibc-langpack-da glibc-langpack-de glibc-langpack-doi glibc-langpack-dsb glibc-langpack-dv glibc-langpack-dz glibc-langpack-el glibc-langpack-en glibc-langpack-eo glibc-langpack-es glibc-langpack-et glibc-langpack-eu glibc-langpack-fa glibc-langpack-ff glibc-langpack-fi glibc-langpack-fil glibc-langpack-fo glibc-langpack-fr glibc-langpack-fur glibc-langpack-fy glibc-langpack-ga glibc-langpack-gd glibc-langpack-gez glibc-langpack-gl glibc-langpack-gu glibc-langpack-gv glibc-langpack-ha glibc-langpack-hak glibc-langpack-he glibc-langpack-hi glibc-langpack-hif glibc-langpack-hne glibc-langpack-hr glibc-langpack-hsb glibc-langpack-ht glibc-langpack-hu glibc-langpack-hy glibc-langpack-ia glibc-langpack-id glibc-langpack-ig glibc-langpack-ik glibc-langpack-is glibc-langpack-it glibc-langpack-iu glibc-langpack-ja glibc-langpack-ka glibc-langpack-kab glibc-langpack-kk glibc-langpack-kl glibc-langpack-km glibc-langpack-kn glibc-langpack-ko glibc-langpack-kok glibc-langpack-ks glibc-langpack-ku glibc-langpack-kw glibc-langpack-ky glibc-langpack-lb glibc-langpack-lg glibc-langpack-li glibc-langpack-lij glibc-langpack-ln glibc-langpack-lo glibc-langpack-lt glibc-langpack-lv glibc-langpack-lzh glibc-langpack-mag glibc-langpack-mai glibc-langpack-mfe glibc-langpack-mg glibc-langpack-mhr glibc-langpack-mi glibc-langpack-miq glibc-langpack-mjw glibc-langpack-mk glibc-langpack-ml glibc-langpack-mn glibc-langpack-mni glibc-langpack-mr glibc-langpack-ms glibc-langpack-mt glibc-langpack-my glibc-langpack-nan glibc-langpack-nb glibc-langpack-nds glibc-langpack-ne glibc-langpack-nhn glibc-langpack-niu glibc-langpack-nl glibc-langpack-nn glibc-langpack-nr glibc-langpack-nso glibc-langpack-oc glibc-langpack-om glibc-langpack-or glibc-langpack-os glibc-langpack-pa glibc-langpack-pap glibc-langpack-pl glibc-langpack-ps glibc-langpack-pt glibc-langpack-quz glibc-langpack-raj glibc-langpack-ro glibc-langpack-ru glibc-langpack-rw glibc-langpack-sa glibc-langpack-sah glibc-langpack-sat glibc-langpack-sc glibc-langpack-sd glibc-langpack-se glibc-langpack-sgs glibc-langpack-shn glibc-langpack-shs glibc-langpack-si glibc-langpack-sid glibc-langpack-sk glibc-langpack-sl glibc-langpack-sm glibc-langpack-so glibc-langpack-sq glibc-langpack-sr glibc-langpack-ss glibc-langpack-st glibc-langpack-sv glibc-langpack-sw glibc-langpack-szl glibc-langpack-ta glibc-langpack-tcy glibc-langpack-te glibc-langpack-tg glibc-langpack-th glibc-langpack-the glibc-langpack-ti glibc-langpack-tig glibc-langpack-tk glibc-langpack-tl glibc-langpack-tn glibc-langpack-to glibc-langpack-tpi glibc-langpack-tr glibc-langpack-ts glibc-langpack-tt glibc-langpack-ug glibc-langpack-uk glibc-langpack-unm glibc-langpack-ur glibc-langpack-uz glibc-langpack-ve glibc-langpack-vi glibc-langpack-wa glibc-langpack-wae glibc-langpack-wal glibc-langpack-wo glibc-langpack-xh glibc-langpack-yi glibc-langpack-yo glibc-langpack-yue glibc-langpack-yuw glibc-langpack-zh glibc-langpack-zu"
|
||||
|
||||
LOCALES_UBUNTU="language-pack-af language-pack-am language-pack-an language-pack-ar language-pack-as language-pack-ast language-pack-az language-pack-be language-pack-bg language-pack-bn language-pack-br language-pack-bs language-pack-ca language-pack-crh language-pack-cs language-pack-cy language-pack-da language-pack-de language-pack-dz language-pack-el language-pack-en language-pack-eo language-pack-es language-pack-et language-pack-eu language-pack-fa language-pack-fi language-pack-fr language-pack-fur language-pack-ga language-pack-gd language-pack-gl language-pack-gu language-pack-he language-pack-hi language-pack-hr language-pack-hu language-pack-ia language-pack-id language-pack-is language-pack-it language-pack-ja language-pack-ka language-pack-kk language-pack-km language-pack-kn language-pack-ko language-pack-ku language-pack-lt language-pack-lv language-pack-mk language-pack-ml language-pack-mr language-pack-ms language-pack-my language-pack-nb language-pack-nds language-pack-ne language-pack-nl language-pack-nn language-pack-oc language-pack-or language-pack-pa language-pack-pl language-pack-pt language-pack-ro language-pack-ru language-pack-si language-pack-sk language-pack-sl language-pack-sq language-pack-sr language-pack-sv language-pack-ta language-pack-te language-pack-tg language-pack-th language-pack-tr language-pack-ug language-pack-uk language-pack-vi language-pack-xh language-pack-zh-hans language-pack-zh-hant"
|
||||
|
||||
LOCALES="aa_DJ aa_ER aa_ET af_ZA am_ET an_ES ar_AE ar_BH ar_DZ ar_EG ar_IN ar_IQ ar_JO ar_KW ar_LB ar_LY ar_MA ar_OM ar_QA ar_SA ar_SD ar_SY ar_TN ar_YE as_IN ast_ES ayc_PE az_AZ be_BY bem_ZM ber_DZ ber_MA bg_BG bho_IN bn_BD bn_IN bo_CN bo_IN br_FR brx_IN bs_BA byn_ER ca_AD ca_ES ca_FR ca_IT crh_UA csb_PL cs_CZ cv_RU cy_GB da_DK de_AT de_BE de_CH de_DE de_LU doi_IN dv_MV dz_BT el_CY el_GR en_AG en_AU en_BW en_CA en_DK en_GB en_HK en_IE en_IN en_NG en_NZ en_PH en_SG en_US en_ZA en_ZM en_ZW es_AR es_BO es_CL es_CO es_CR es_CU es_DO es_EC es_ES es_GT es_HN es_MX es_NI es_PA es_PE es_PR es_PY es_SV es_US es_UY es_VE et_EE eu_ES fa_IR ff_SN fi_FI fil_PH fo_FO fr_BE fr_CA fr_CH fr_FR fr_LU fur_IT fy_DE fy_NL ga_IE gd_GB gez_ER gez_ET gl_ES gu_IN gv_GB ha_NG he_IL hi_IN hne_IN hr_HR hsb_DE ht_HT hu_HU hy_AM ia_FR id_ID ig_NG ik_CA is_IS it_CH it_IT iu_CA ja_JP ka_GE kk_KZ kl_GL km_KH kn_IN kok_IN ko_KR ks_IN ku_TR kw_GB ky_KG lb_LU lg_UG li_BE lij_IT li_NL lo_LA lt_LT lv_LV mag_IN mai_IN mg_MG mhr_RU mi_NZ mk_MK ml_IN mni_IN mn_MN mr_IN ms_MY mt_MT my_MM nb_NO nds_DE nds_NL ne_NP nhn_MX niu_NU niu_NZ nl_AW nl_BE nl_NL nn_NO nr_ZA nso_ZA oc_FR om_ET om_KE or_IN os_RU pa_IN pa_PK pl_PL ps_AF pt_BR pt_PT ro_RO ru_RU ru_UA rw_RW sa_IN sat_IN sc_IT sd_IN se_NO shs_CA sid_ET si_LK sk_SK sl_SI so_DJ so_ET so_KE so_SO sq_AL sq_MK sr_ME sr_RS ss_ZA st_ZA sv_FI sv_SE sw_KE sw_TZ szl_PL ta_IN ta_LK te_IN tg_TJ th_TH ti_ER ti_ET tig_ER tk_TM tl_PH tn_ZA tr_CY tr_TR ts_ZA tt_RU ug_CN uk_UA unm_US ur_IN ur_PK uz_UZ ve_ZA vi_VN wa_BE wae_CH wal_ET wo_SN xh_ZA yi_US yo_NG yue_HK zh_CN zh_HK zh_SG zh_TW zu_ZA"
|
||||
|
||||
echo "Installing fonts and languages"
|
||||
if [[ "${DISTRO}" == "oracle7" ]]; then
|
||||
yum-config-manager --enable ol7_optional_latest
|
||||
yum install -y \
|
||||
google-noto-emoji-fonts \
|
||||
google-noto-sans-cjk-fonts \
|
||||
google-noto-sans-fonts
|
||||
elif [[ "${DISTRO}" == "centos" ]]; then
|
||||
yum install -y \
|
||||
google-noto-emoji-fonts \
|
||||
google-noto-sans-cjk-fonts \
|
||||
google-noto-sans-fonts
|
||||
elif [[ "${DISTRO}" == "fedora37" ]]; then
|
||||
dnf install -y \
|
||||
glibc-locale-source \
|
||||
google-noto-cjk-fonts \
|
||||
google-noto-emoji-fonts \
|
||||
google-noto-sans-fonts \
|
||||
${LOCALES_RHEL}
|
||||
for LOCALE in ${LOCALES}; do
|
||||
echo "Generating Locale for ${LOCALE}"
|
||||
localedef -i ${LOCALE} -f UTF-8 ${LOCALE}.UTF-8
|
||||
done
|
||||
elif [[ "${DISTRO}" == @(oracle8|oracle9|rockylinux9|rockylinux8|almalinux9|almalinux8) ]]; then
|
||||
dnf install -y \
|
||||
glibc-locale-source \
|
||||
google-noto-emoji-fonts \
|
||||
google-noto-sans-cjk-ttc-fonts \
|
||||
google-noto-sans-fonts \
|
||||
${LOCALES_RHEL}
|
||||
for LOCALE in ${LOCALES}; do
|
||||
echo "Generating Locale for ${LOCALE}"
|
||||
localedef -i ${LOCALE} -f UTF-8 ${LOCALE}.UTF-8
|
||||
done
|
||||
elif [ "${DISTRO}" == "opensuse" ]; then
|
||||
zypper install -ny wqy-zenhei-fonts
|
||||
zypper clean --all
|
||||
zypper addrepo -G \
|
||||
https://ftp.lysator.liu.se/pub/opensuse/repositories/M17N:/fonts/openSUSE_Leap_15.3/ fonts-x86_64
|
||||
zypper install -ny \
|
||||
glibc-i18ndata \
|
||||
glibc-locale \
|
||||
google-noto-coloremoji-fonts \
|
||||
google-noto-sans-cjk-fonts \
|
||||
noto-sans-fonts
|
||||
for LOCALE in ${LOCALES}; do
|
||||
echo "Generating Locale for ${LOCALE}"
|
||||
localedef -i ${LOCALE} -f UTF-8 ${LOCALE}.UTF-8
|
||||
done
|
||||
elif [ "${DISTRO}" == "alpine" ]; then
|
||||
apk add --no-cache \
|
||||
font-noto \
|
||||
font-noto-cjk
|
||||
font-noto-all \
|
||||
font-noto-cjk \
|
||||
font-noto-emoji
|
||||
elif [[ "${DISTRO}" == @(debian|parrotos5|kali) ]]; then
|
||||
apt-get update
|
||||
apt-get install -y \
|
||||
fonts-noto-core \
|
||||
fonts-noto-cjk \
|
||||
fonts-noto-color-emoji \
|
||||
locales-all
|
||||
for LOCALE in ${LOCALES}; do
|
||||
echo "Generating Locale for ${LOCALE}"
|
||||
localedef -i ${LOCALE} -f UTF-8 ${LOCALE}.UTF-8
|
||||
done
|
||||
elif $(grep -q Bionic /etc/os-release); then
|
||||
apt-get update
|
||||
apt-get install -y \
|
||||
fonts-noto-cjk \
|
||||
fonts-noto-color-emoji \
|
||||
fonts-noto-hinted \
|
||||
fonts-noto-unhinted \
|
||||
${LOCALES_UBUNTU}
|
||||
else
|
||||
apt-get update
|
||||
apt-get install -y ttf-wqy-zenhei
|
||||
apt-get autoclean
|
||||
rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/tmp/*
|
||||
apt-get install -y \
|
||||
fonts-noto-core \
|
||||
fonts-noto-cjk \
|
||||
fonts-noto-color-emoji \
|
||||
${LOCALES_UBUNTU}
|
||||
fi
|
||||
|
@ -17,9 +17,9 @@ echo "Install KasmVNC server"
|
||||
cd /tmp
|
||||
BUILD_ARCH=$(uname -p)
|
||||
UBUNTU_CODENAME=""
|
||||
COMMIT_ID="9a8bfce25fd81a44e815937db72a84399635e4ef"
|
||||
BRANCH="master" # just use 'release' for a release branch
|
||||
KASMVNC_VER="1.0.2"
|
||||
COMMIT_ID="56c840fc947d891f054bf251d2a02454d3e6f686"
|
||||
BRANCH="release" # just use 'release' for a release branch
|
||||
KASMVNC_VER="1.1.0"
|
||||
COMMIT_ID_SHORT=$(echo "${COMMIT_ID}" | cut -c1-6)
|
||||
|
||||
# Naming scheme is now different between an official release and feature branch
|
||||
@ -95,7 +95,6 @@ elif [[ "${DISTRO}" == @(oracle8|oracle9|rockylinux9|rockylinux8|almalinux8|alma
|
||||
dnf localinstall -y kasmvncserver.rpm
|
||||
dnf install -y mesa-dri-drivers
|
||||
rm kasmvncserver.rpm
|
||||
dnf clean all
|
||||
elif [[ "${DISTRO}" == "fedora37" ]] ; then
|
||||
dnf install -y xorg-x11-drv-amdgpu xorg-x11-drv-ati
|
||||
if [ "${BUILD_ARCH}" == "x86_64" ]; then
|
||||
@ -105,7 +104,6 @@ elif [[ "${DISTRO}" == "fedora37" ]] ; then
|
||||
dnf localinstall -y --allowerasing kasmvncserver.rpm
|
||||
dnf install -y mesa-dri-drivers
|
||||
rm kasmvncserver.rpm
|
||||
dnf clean all
|
||||
elif [[ "${DISTRO}" == "opensuse" ]] ; then
|
||||
mkdir -p /etc/pki/tls/private
|
||||
wget "${BUILD_URL}" -O kasmvncserver.rpm
|
||||
@ -117,7 +115,6 @@ elif [[ "${DISTRO}" == "opensuse" ]] ; then
|
||||
fi
|
||||
zypper install -y --allow-unsigned-rpm ./kasmvncserver.rpm
|
||||
rm kasmvncserver.rpm
|
||||
zypper clean --all
|
||||
elif [[ "${DISTRO}" == "alpine" ]] ; then
|
||||
apk add --no-cache \
|
||||
libgomp \
|
||||
@ -158,11 +155,6 @@ else
|
||||
apt-get install -y gettext ssl-cert libxfont2
|
||||
apt-get install -y /tmp/kasmvncserver.deb
|
||||
rm -f /tmp/kasmvncserver.deb
|
||||
apt-get autoclean
|
||||
rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/tmp/*
|
||||
fi
|
||||
#mkdir $KASM_VNC_PATH/certs
|
||||
mkdir -p $KASM_VNC_PATH/www/Downloads
|
||||
@ -170,4 +162,3 @@ chown -R 0:0 $KASM_VNC_PATH
|
||||
chmod -R og-w $KASM_VNC_PATH
|
||||
#chown -R 1000:0 $KASM_VNC_PATH/certs
|
||||
chown -R 1000:0 $KASM_VNC_PATH/www/Downloads
|
||||
ln -s $KASM_VNC_PATH/www/index.html $KASM_VNC_PATH/www/vnc.html
|
||||
|
19
src/ubuntu/install/langpacks/install_langpacks.sh
Normal file
19
src/ubuntu/install/langpacks/install_langpacks.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
if [ "${DISTRO}" == "opensuse" ]; then
|
||||
zypper search -t package "*-lang" | awk '{print $2}' > /tmp/lang-packages
|
||||
rpm -qa --queryformat "%{NAME}\n" > /tmp/installed-packages
|
||||
to_install=""
|
||||
while read p; do
|
||||
if grep -qw "^${p}-lang$" /tmp/lang-packages; then
|
||||
to_install="$to_install ${p}-lang"
|
||||
fi
|
||||
done </tmp/installed-packages
|
||||
if [ -n "$to_install" ]; then
|
||||
zypper -n install $to_install
|
||||
fi
|
||||
elif [ "${DISTRO}" == "alpine" ]; then
|
||||
apk add --no-cache \
|
||||
lang
|
||||
fi
|
20
src/ubuntu/install/package_rules/package_rules.sh
Normal file
20
src/ubuntu/install/package_rules/package_rules.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
if [[ "${DISTRO}" == "ubuntu" ]] ; then
|
||||
sed -i \
|
||||
'/locale/d' \
|
||||
/etc/dpkg/dpkg.cfg.d/excludes
|
||||
elif [[ "${DISTRO}" == "debian" ]] ; then
|
||||
sed -i \
|
||||
'/locale/d' \
|
||||
/etc/dpkg/dpkg.cfg.d/docker
|
||||
elif [[ "${DISTRO}" == @(almalinux8|almalinux9|fedora37|oracle8|oracle9|rockylinux8|rockylinux9) ]]; then
|
||||
rm -f /etc/rpm/macros.image-language-conf
|
||||
elif [[ "${DISTRO}" == @(centos|oracle7) ]]; then
|
||||
sed -i \
|
||||
'/override_install_langs/d' \
|
||||
/etc/yum.conf
|
||||
yum reinstall -y \
|
||||
glibc-common
|
||||
fi
|
@ -90,19 +90,12 @@ if [[ "${DISTRO}" == @(centos|oracle7) ]]; then
|
||||
yum install -y nss-tools
|
||||
elif [[ "${DISTRO}" == @(oracle8|fedora37|oracle9|rockylinux9|rockylinux8|almalinux9|almalinux8) ]]; then
|
||||
dnf install -y nss-tools
|
||||
dnf clean all
|
||||
elif [ "${DISTRO}" == "opensuse" ]; then
|
||||
zypper install -yn mozilla-nss-tools
|
||||
zypper clean --all
|
||||
elif [ "${DISTRO}" == "alpine" ]; then
|
||||
apk add --no-cache nss-tools
|
||||
else
|
||||
apt-get install -y libnss3-tools
|
||||
apt-get autoclean
|
||||
rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/tmp/*
|
||||
fi
|
||||
|
||||
# Create an empty cert9.db. This will be used by applications like Chrome
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 4.1 KiB |
@ -50,3 +50,7 @@ forwarded_for delete
|
||||
via off
|
||||
|
||||
url_rewrite_program /bin/bash -c "/etc/squid/kasm_squid_adapter"
|
||||
|
||||
# Ensure compatibility with base operating systems by using a sane number of file descriptors
|
||||
max_filedescriptors 1048576
|
||||
|
||||
|
108
src/ubuntu/install/sysbox/install_systemd.sh
Normal file
108
src/ubuntu/install/sysbox/install_systemd.sh
Normal file
@ -0,0 +1,108 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
# Setup systemd based on distro type
|
||||
if [[ "${DISTRO}" == @(ubuntu|debian|parrotos5|kali) ]] ; then
|
||||
# Install deps
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
dbus \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
libsystemd0 \
|
||||
sudo \
|
||||
systemd \
|
||||
systemd-sysv \
|
||||
udev
|
||||
elif [[ "${DISTRO}" == @(oracle8|oracle9|rockylinux9|rockylinux8|almalinux9|almalinux8|fedora37) ]]; then
|
||||
# Install deps
|
||||
dnf install -y \
|
||||
dbus \
|
||||
iproute \
|
||||
iptables \
|
||||
kmod \
|
||||
sudo \
|
||||
systemd \
|
||||
udev
|
||||
elif [ "${DISTRO}" == "opensuse" ]; then
|
||||
# Install deps
|
||||
zypper install -y \
|
||||
dbus-1 \
|
||||
iproute2 \
|
||||
iptables \
|
||||
kmod \
|
||||
sudo \
|
||||
systemd \
|
||||
systemd-sysvinit \
|
||||
udev
|
||||
fi
|
||||
|
||||
|
||||
# Disable systemd stuff that does not work
|
||||
echo "ReadKMsg=no" >> /etc/systemd/journald.conf
|
||||
systemctl mask \
|
||||
systemd-udevd.service \
|
||||
systemd-journald-audit.socket \
|
||||
systemd-udevd-kernel.socket \
|
||||
systemd-udevd-control.socket \
|
||||
systemd-modules-load.service \
|
||||
systemd-udev-trigger.service \
|
||||
sys-kernel-config.mount \
|
||||
sys-kernel-debug.mount \
|
||||
sys-kernel-tracing.mount
|
||||
rm -f /usr/share/dbus-1/system-services/org.freedesktop.UPower.service
|
||||
|
||||
# Generate our standard init systemd service and init helper
|
||||
cat >/etc/systemd/system/kasm.service<<EOL
|
||||
[Unit]
|
||||
Description=Kasm Workspaces Init
|
||||
After=kasm-setup.service
|
||||
|
||||
[Service]
|
||||
User=kasm-user
|
||||
Group=kasm-user
|
||||
EnvironmentFile=/envdump
|
||||
Type=simple
|
||||
ExecStart=/bin/bash /dockerstartup/kasm_default_profile.sh /dockerstartup/vnc_startup.sh /dockerstartup/kasm_startup.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOL
|
||||
cat >/etc/systemd/system/kasm-setup.service<<EOL
|
||||
[Unit]
|
||||
Description=Kasm Workspaces root level setup
|
||||
Before=kasm.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/bash /kasm-sysbox-setup.sh
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOL
|
||||
cat >/kasm-sysbox-setup.sh<<EOL
|
||||
#!/bin/bash
|
||||
mkdir -p /var/run/pulse
|
||||
chown kasm-user:kasm-user /var/run/pulse
|
||||
cat /proc/1/environ | xargs --null --max-args=1 > /envdump
|
||||
if [ -f /usr/sbin/policy-rc.d ]; then
|
||||
printf '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d
|
||||
fi
|
||||
systemctl disable gdm
|
||||
systemctl disable power-profiles-daemon
|
||||
systemctl disable sshd
|
||||
systemctl disable unattended-upgrades
|
||||
systemctl disable upower
|
||||
systemctl disable wpa_supplicant
|
||||
systemctl stop gdm
|
||||
systemctl stop power-profiles-daemon
|
||||
systemctl stop sshd
|
||||
systemctl stop unattended-upgrades
|
||||
systemctl stop upower
|
||||
systemctl stop wpa_supplicant
|
||||
EOL
|
||||
chmod +x /kasm-sysbox-setup.sh
|
||||
chmod 644 /etc/systemd/system/kasm.service /etc/systemd/system/kasm-setup.service
|
||||
systemctl enable kasm kasm-setup
|
@ -6,11 +6,9 @@ if [[ "${DISTRO}" == @(centos|oracle7) ]] ; then
|
||||
yum install -y vim wget net-tools bzip2 python3 ca-certificates
|
||||
elif [[ "${DISTRO}" == @(fedora37|oracle8|oracle9|rockylinux9|rockylinux8|almalinux8|almalinux9) ]]; then
|
||||
dnf install -y wget net-tools bzip2 python3 tar vim hostname procps-ng
|
||||
dnf clean all
|
||||
elif [ "${DISTRO}" == "opensuse" ]; then
|
||||
sed -i 's/download.opensuse.org/mirrorcache-us.opensuse.org/g' /etc/zypp/repos.d/*.repo
|
||||
zypper install -yn wget net-tools bzip2 python3 tar vim gzip iputils
|
||||
zypper clean --all
|
||||
elif [ "${DISTRO}" == "alpine" ]; then
|
||||
apk add --no-cache \
|
||||
ca-certificates \
|
||||
@ -31,13 +29,8 @@ else
|
||||
# Update tzdata noninteractive (otherwise our script is hung on user input later).
|
||||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
|
||||
apt-get install -y vim wget net-tools locales bzip2 wmctrl software-properties-common mesa-utils
|
||||
apt-get autoclean
|
||||
rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/tmp/*
|
||||
|
||||
echo "generate locales für en_US.UTF-8"
|
||||
echo "generate locales for en_US.UTF-8"
|
||||
locale-gen en_US.UTF-8
|
||||
fi
|
||||
|
||||
@ -46,9 +39,4 @@ if [ "$DISTRO" = "ubuntu" ]; then
|
||||
add-apt-repository ppa:kisak/turtle
|
||||
apt-get update
|
||||
apt full-upgrade -y
|
||||
apt-get autoclean
|
||||
rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/tmp/*
|
||||
fi
|
||||
|
@ -33,9 +33,4 @@ if [ "$DISTRO" = "ubuntu" ]; then
|
||||
|
||||
apt install -f -y
|
||||
rm -rf $INST_SCRIPTS/virtualgl/
|
||||
apt-get autoclean
|
||||
rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/tmp/*
|
||||
fi
|
||||
|
@ -2,27 +2,10 @@
|
||||
### every exit != 0 fails the script
|
||||
set -e
|
||||
|
||||
get_rid_of_policykit_error() {
|
||||
rm -f /etc/xdg/autostart/xfce-polkit.desktop
|
||||
}
|
||||
|
||||
disable_epel_nss_wrapper_that_breaks_firefox() {
|
||||
yum-config-manager --setopt=epel.exclude=nss_wrapper --save
|
||||
}
|
||||
|
||||
config_xinit_disable_screensaver() {
|
||||
mkdir -p /etc/X11/xinit/xinitrc.d/
|
||||
cat >/etc/X11/xinit/xinitrc.d/disable_screensaver.sh <<EOL
|
||||
#!/bin/sh
|
||||
set -x
|
||||
xset -dpms
|
||||
xset s off
|
||||
xset q
|
||||
EOL
|
||||
|
||||
chmod +x /etc/X11/xinit/xinitrc.d/disable_screensaver.sh
|
||||
}
|
||||
|
||||
replace_default_xinit() {
|
||||
|
||||
mkdir -p /etc/X11/xinit
|
||||
@ -82,9 +65,25 @@ if [ "${DISTRO}" == "kali" ]; then
|
||||
xfce4-taskmanager \
|
||||
xfce4-whiskermenu-plugin
|
||||
elif [[ "$DISTRO" = @(ubuntu|debian) ]]; then
|
||||
apt-get install -y dbus-x11 supervisor xfce4 xfce4-terminal xterm xclip
|
||||
apt-get install -y \
|
||||
dbus-x11 \
|
||||
supervisor \
|
||||
xfce4 \
|
||||
xfce4-terminal \
|
||||
xterm \
|
||||
xclip
|
||||
elif [[ "$DISTRO" = "parrotos5" ]]; then
|
||||
apt-get install -y maia-icon-theme parrot-themes parrot-wallpapers desktop-base xclip dbus-x11 supervisor xfce4 xfce4-terminal parrot-menu
|
||||
apt-get install -y \
|
||||
dbus-x11 \
|
||||
desktop-base \
|
||||
maia-icon-theme \
|
||||
parrot-menu \
|
||||
parrot-themes \
|
||||
parrot-wallpapers \
|
||||
supervisor \
|
||||
xclip \
|
||||
xfce4 \
|
||||
xfce4-terminal
|
||||
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
locale-gen
|
||||
elif [[ "${DISTRO}" == @(centos|oracle7) ]]; then
|
||||
@ -95,47 +94,64 @@ elif [[ "${DISTRO}" == @(centos|oracle7) ]]; then
|
||||
fi
|
||||
disable_epel_nss_wrapper_that_breaks_firefox
|
||||
yum groupinstall xfce -y
|
||||
yum install -y wmctrl xset xclip xfce4-notifyd
|
||||
get_rid_of_policykit_error
|
||||
yum remove -y xfce4-power-manager
|
||||
yum install -y \
|
||||
wmctrl \
|
||||
xclip \
|
||||
xfce4-notifyd \
|
||||
xset
|
||||
elif [ "$DISTRO" = "oracle8" ]; then
|
||||
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||
dnf group install xfce -y
|
||||
dnf install -y wmctrl xset xclip xfce4-notifyd
|
||||
get_rid_of_policykit_error
|
||||
dnf remove -y xfce4-power-manager xfce4-screensaver
|
||||
dnf install -y \
|
||||
wmctrl \
|
||||
xclip \
|
||||
xfce4-notifyd \
|
||||
xset
|
||||
elif [ "$DISTRO" = "oracle9" ]; then
|
||||
dnf config-manager --set-enabled ol9_codeready_builder
|
||||
dnf config-manager --set-enabled ol9_distro_builder
|
||||
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
||||
dnf group install xfce -y -x oracle-backgrounds
|
||||
dnf install -y wmctrl xset xclip xfce4-notifyd dbus-x11
|
||||
get_rid_of_policykit_error
|
||||
dnf remove -y xfce4-power-manager xfce4-screensaver
|
||||
dnf install -y \
|
||||
dbus-x11 \
|
||||
wmctrl \
|
||||
xclip \
|
||||
xfce4-notifyd \
|
||||
xset
|
||||
elif [[ "$DISTRO" == @(rockylinux9|almalinux9) ]]; then
|
||||
dnf config-manager --set-enabled crb
|
||||
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
|
||||
dnf group install xfce -y
|
||||
dnf install -y wmctrl xset xclip xfce4-notifyd dbus-x11
|
||||
dnf remove -y xfce4-power-manager xfce4-screensaver
|
||||
echo "exit 0" > /usr/libexec/xfce-polkit
|
||||
dnf install -y \
|
||||
dbus-x11 \
|
||||
wmctrl \
|
||||
xclip \
|
||||
xfce4-notifyd \
|
||||
xset
|
||||
elif [[ "$DISTRO" == @(rockylinux8|almalinux8) ]]; then
|
||||
dnf config-manager --set-enabled powertools
|
||||
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||
dnf group install xfce -y
|
||||
dnf install -y wmctrl xset xclip xfce4-notifyd dbus-x11
|
||||
dnf remove -y xfce4-power-manager xfce4-screensaver
|
||||
echo "exit 0" > /usr/libexec/xfce-polkit
|
||||
dnf install -y \
|
||||
dbus-x11 \
|
||||
wmctrl \
|
||||
xclip \
|
||||
xfce4-notifyd \
|
||||
xset
|
||||
elif [ "$DISTRO" = "opensuse" ]; then
|
||||
zypper install -yn -t pattern xfce
|
||||
zypper install -yn xset xfce4-terminal xclip xfce4-notifyd
|
||||
zypper remove -yn xfce4-power-manager
|
||||
get_rid_of_policykit_error
|
||||
zypper install -yn \
|
||||
xclip \
|
||||
xfce4-notifyd \
|
||||
xfce4-terminal \
|
||||
xset
|
||||
elif [ "$DISTRO" = "fedora37" ]; then
|
||||
dnf group install xfce -y
|
||||
dnf install -y wmctrl xset xclip xfce4-notifyd
|
||||
get_rid_of_policykit_error
|
||||
dnf remove -y xfce4-power-manager xfce4-screensaver
|
||||
dnf install -y \
|
||||
wmctrl \
|
||||
xclip \
|
||||
xfce4-notifyd \
|
||||
xset
|
||||
elif [ "$DISTRO" = "alpine" ]; then
|
||||
apk add --no-cache \
|
||||
dbus-x11 \
|
||||
@ -152,34 +168,8 @@ elif [ "$DISTRO" = "alpine" ]; then
|
||||
rm -f /usr/share/xfce4/panel/plugins/power-manager-plugin.desktop
|
||||
fi
|
||||
|
||||
if grep -q Jammy /etc/os-release; then
|
||||
apt-get purge -y xfce4-screensaver
|
||||
fi
|
||||
|
||||
if [[ "${DISTRO}" == @(centos|oracle7) ]]; then
|
||||
yum clean all
|
||||
elif [[ "${DISTRO}" == @(fedora37|oracle8|oracle9|rockylinux9|rockylinux8|almalinux9|almalinux8) ]]; then
|
||||
dnf clean all
|
||||
elif [ "${DISTRO}" == "opensuse" ]; then
|
||||
zypper clean --all
|
||||
elif [ "${DISTRO}" == "alpine" ]; then
|
||||
rm -Rf /tmp/*
|
||||
else
|
||||
apt-get purge -y pm-utils xscreensaver*
|
||||
apt-get autoclean
|
||||
rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/* \
|
||||
/tmp/*
|
||||
fi
|
||||
|
||||
if [[ "${DISTRO}" == @(centos|oracle7|oracle8|fedora37|oracle9|rockylinux9|rockylinux8|almalinux8|almalinux9) ]]; then
|
||||
config_xinit_disable_screensaver
|
||||
elif [ "${DISTRO}" == "alpine" ]; then
|
||||
echo ""
|
||||
else
|
||||
if [[ "${DISTRO}" != @(centos|oracle7|oracle8|fedora37|oracle9|rockylinux9|rockylinux8|almalinux8|almalinux9|alpine) ]]; then
|
||||
replace_default_xinit
|
||||
config_xinit_disable_screensaver
|
||||
if [ "${START_XFCE4}" == "1" ] ; then
|
||||
replace_default_99x11_common_start
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user