From 7b1b4984a4f3480080afd5233c1e84e2d2a14ae4 Mon Sep 17 00:00:00 2001 From: Ryan Kuba Date: Tue, 9 Jan 2024 23:18:31 +0000 Subject: [PATCH] Resolve KASM-5341 "Feature/ app layers jammy" --- ci-scripts/app-layer.sh | 89 +++++++++++++++++++ ci-scripts/gitlab-ci.template | 10 ++- ci-scripts/template-vars.yaml | 89 +++++++++++++++++-- dockerfile-kasm-super-tux-kart | 2 +- src/ubuntu/install/atom/install_atom.sh | 14 +++ .../install/audacity/install_audacity.sh | 14 ++- src/ubuntu/install/blender/install_blender.sh | 17 ++++ src/ubuntu/install/brave/install_brave.sh | 10 ++- src/ubuntu/install/chrome/install_chrome.sh | 4 + .../install/chromium/install_chromium.sh | 4 + src/ubuntu/install/deluge/install_deluge.sh | 16 +++- src/ubuntu/install/discord/install_discord.sh | 4 + src/ubuntu/install/doom/install_doom.sh | 23 +++++ src/ubuntu/install/eclipse/install_eclipse.sh | 2 +- src/ubuntu/install/edge/install_edge.sh | 31 ++++--- .../install/filezilla/install_filezilla.sh | 14 ++- src/ubuntu/install/firefox/install_firefox.sh | 8 ++ src/ubuntu/install/gimp/install_gimp.sh | 16 +++- .../gtk/install_restricted_file_chooser.sh | 6 ++ src/ubuntu/install/hunchly/install_hunchly.sh | 39 ++++++-- .../install/inkscape/install_inkscape.sh | 13 ++- .../install/insomnia/install_insomnia.sh | 16 +++- .../libre_office/install_libre_office.sh | 14 +-- src/ubuntu/install/maltego/install_maltego.sh | 14 ++- .../install/minetest/install_minetest.sh | 9 +- .../only_office/install_only_office.sh | 14 ++- src/ubuntu/install/pinta/install_pinta.sh | 17 +++- src/ubuntu/install/postman/install_postman.sh | 16 +++- .../qbittorrent/install_qbittorrent.sh | 13 ++- src/ubuntu/install/remmina/install_remmina.sh | 3 + .../install/retroarch/install_retroarch.sh | 11 ++- src/ubuntu/install/signal/install_signal.sh | 19 +++- src/ubuntu/install/slack/install_slack.sh | 20 +++++ .../install/spiderfoot/install_spiderfoot.sh | 26 ++++-- src/ubuntu/install/steam/install_steam.sh | 17 +++- .../sublime_text/install_sublime_text.sh | 15 +++- .../super_tux_kart/install_super_tux_kart.sh | 13 +++ .../install/telegram/install_telegram.sh | 20 +++-- .../thunderbird/install_thunderbird.sh | 4 + .../install/torbrowser/install_torbrowser.sh | 13 ++- .../install/unityhub/install_unityhub.sh | 18 +++- src/ubuntu/install/vivaldi/install_vivaldi.sh | 5 ++ src/ubuntu/install/vlc/install_vlc.sh | 19 +++- src/ubuntu/install/vs_code/install_vs_code.sh | 11 ++- src/ubuntu/install/zoom/install_zoom.sh | 12 ++- src/ubuntu/install/zsnes/install_zsnes.sh | 20 ++++- 46 files changed, 684 insertions(+), 100 deletions(-) create mode 100644 ci-scripts/app-layer.sh diff --git a/ci-scripts/app-layer.sh b/ci-scripts/app-layer.sh new file mode 100644 index 0000000..7c29633 --- /dev/null +++ b/ci-scripts/app-layer.sh @@ -0,0 +1,89 @@ +#! /bin/bash + +# Ingest cli variables +## Parse input ## +NAME=$1 +TYPE=$2 +BASE=$3 +IS_ROLLING=$4 + +# Determine if this is a private or public build +if [[ "${CI_COMMIT_REF_NAME}" == release/* ]] || [[ "${CI_COMMIT_REF_NAME}" == "develop" ]]; then + ENDPOINT="${NAME}" + APPS="kasm-apps" +else + ENDPOINT="${NAME}-private" + APPS="kasm-apps-private" +fi + +# Determine if this is a rolling build +if [[ "${CI_PIPELINE_SOURCE}" == "schedule" ]] || [[ "${IS_ROLLING}" == "true" ]]; then + SANITIZED_BRANCH=${SANITIZED_BRANCH}-rolling +fi + +# Create workspace and base dockerfile +mkdir -p applayer +cd applayer +echo "FROM scratch" > Dockerfile +echo "ADD ./layer.tar /" >> Dockerfile + +# Clean up layer tar to not include overlay info +clean_tar () { + mkdir cleantar + tar xf layer.tar -C cleantar/ --exclude="**.wh**" + rm layer.tar + cd cleantar + tar -cf layer.tar * + mv layer.tar ../ + cd .. + rm -Rf cleantar/ +} + +# Multi arch +if [ "${TYPE}" == "multi" ]; then + for ARCH in x86_64 aarch64; do + # Create image tarballs + docker save -o $ARCH.tar ${ORG_NAME}/${ENDPOINT}:${ARCH}-${SANITIZED_BRANCH} + # Pull out the layer we are looking for + mkdir $ARCH + mv $ARCH.tar $ARCH + cd $ARCH + tar xf $ARCH.tar + LAYER_FOLDER=$(du -sk * |sort -nr | sed '3q;d' | awk '{print $2}') + mv $LAYER_FOLDER/layer.tar ../ + cd ../ + rm -Rf $ARCH + clean_tar + # build the image based on this single layer + docker build -t ${ORG_NAME}/${APPS}:${ARCH}-${BASE}-${NAME}-${SANITIZED_BRANCH} . + docker push ${ORG_NAME}/${APPS}:${ARCH}-${BASE}-${NAME}-${SANITIZED_BRANCH} + rm -f layer.tar + done + # Manifest + docker manifest push --purge ${ORG_NAME}/${APPS}:${BASE}-${NAME}-${SANITIZED_BRANCH} || : + docker manifest create ${ORG_NAME}/${APPS}:${BASE}-${NAME}-${SANITIZED_BRANCH} ${ORG_NAME}/${APPS}:x86_64-${BASE}-${NAME}-${SANITIZED_BRANCH} ${ORG_NAME}/${APPS}:aarch64-${BASE}-${NAME}-${SANITIZED_BRANCH} + docker manifest annotate ${ORG_NAME}/${APPS}:${BASE}-${NAME}-${SANITIZED_BRANCH} ${ORG_NAME}/${APPS}:aarch64-${BASE}-${NAME}-${SANITIZED_BRANCH} --os linux --arch arm64 --variant v8 + docker manifest push --purge ${ORG_NAME}/${APPS}:${BASE}-${NAME}-${SANITIZED_BRANCH} +# Single arch +else + # Create image tarballs + docker save -o image.tar ${ORG_NAME}/${ENDPOINT}:${SANITIZED_BRANCH} + # Pull out the layer we are looking for + mkdir image + mv image.tar image + cd image + tar xf image.tar + LAYER_FOLDER=$(du -sk * |sort -nr | sed '3q;d' | awk '{print $2}') + mv $LAYER_FOLDER/layer.tar ../ + cd ../ + rm -Rf image + clean_tar + # build the image based on this single layer + docker build -t ${ORG_NAME}/${APPS}:${BASE}-${NAME}-${SANITIZED_BRANCH} . + docker push ${ORG_NAME}/${APPS}:${BASE}-${NAME}-${SANITIZED_BRANCH} + rm -f layer.tar +fi + +# Cleanup +cd .. +rm -Rf applayer diff --git a/ci-scripts/gitlab-ci.template b/ci-scripts/gitlab-ci.template index 24548ff..1e75051 100644 --- a/ci-scripts/gitlab-ci.template +++ b/ci-scripts/gitlab-ci.template @@ -137,8 +137,9 @@ manifest_{{ IMAGE.name }}: stage: manifest when: always script: - - apk add bash - - bash ci-scripts/manifest.sh "{{ IMAGE.name }}" "multi" + - apk add bash tar + - bash ci-scripts/manifest.sh "{{ IMAGE.name }}" "multi"{% if IMAGE.singleapp %} + - bash ci-scripts/app-layer.sh "{{ IMAGE.name }}" "multi" "{{ IMAGE.base }}"{% endif %} {% if FILE_LIMITS %}only: changes: {% for FILE in files %}- {{ FILE }} @@ -162,8 +163,9 @@ manifest_{{ IMAGE.name }}: stage: manifest when: always script: - - apk add bash - - bash ci-scripts/manifest.sh "{{ IMAGE.name }}" "single" + - apk add bash tar + - bash ci-scripts/manifest.sh "{{ IMAGE.name }}" "single"{% if IMAGE.singleapp %} + - bash ci-scripts/app-layer.sh "{{ IMAGE.name }}" "single" "{{ IMAGE.base }}"{% endif %} {% if FILE_LIMITS %}only: changes: {% for FILE in files %}- {{ FILE }} diff --git a/ci-scripts/template-vars.yaml b/ci-scripts/template-vars.yaml index 7c665ae..748b941 100644 --- a/ci-scripts/template-vars.yaml +++ b/ci-scripts/template-vars.yaml @@ -5,12 +5,14 @@ files: &UNIVERSAL_CHANGE_FILES multiImages: - name: audacity + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-audacity changeFiles: - dockerfile-kasm-audacity - src/ubuntu/install/audacity/** - name: chromium + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-chromium changeFiles: @@ -19,24 +21,28 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/certificates/** - name: deluge + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-deluge changeFiles: - dockerfile-kasm-deluge - src/ubuntu/install/deluge/** - name: doom + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-doom changeFiles: - dockerfile-kasm-doom - src/ubuntu/install/doom/** - name: filezilla + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-filezilla changeFiles: - dockerfile-kasm-filezilla - src/ubuntu/install/filezilla/** - name: firefox + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-firefox changeFiles: @@ -45,18 +51,21 @@ multiImages: - src/ubuntu/install/firefox/** - src/ubuntu/install/certificates/** - name: gimp + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-gimp changeFiles: - dockerfile-kasm-gimp - src/ubuntu/install/gimp/** - name: inkscape + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-inkscape changeFiles: - dockerfile-kasm-inkscape - src/ubuntu/install/inkscape/** - name: java-dev + singleapp: false base: core-ubuntu-focal dockerfile: dockerfile-kasm-java-dev changeFiles: @@ -70,12 +79,14 @@ multiImages: - src/ubuntu/install/chrome/** - src/ubuntu/install/eclipse/** - name: libre-office + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-libre-office changeFiles: - dockerfile-kasm-libre-office - src/ubuntu/install/libre_office/** - name: opensuse-15-desktop + singleapp: false base: core-opensuse-15 dockerfile: dockerfile-kasm-opensuse-15-desktop changeFiles: @@ -91,6 +102,7 @@ multiImages: - src/ubuntu/install/slack/** - src/opensuse/install/** - name: oracle-8-desktop + singleapp: false base: core-oracle-8 dockerfile: dockerfile-kasm-oracle-8-desktop changeFiles: @@ -104,18 +116,21 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/slack/** - name: pinta + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-pinta changeFiles: - dockerfile-kasm-pinta - src/ubuntu/install/pinta/** - name: qbittorrent + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-qbittorrent changeFiles: - dockerfile-kasm-qbittorrent - src/ubuntu/install/qbittorrent/** - name: redroid + singleapp: false base: core-ubuntu-jammy dockerfile: dockerfile-kasm-redroid changeFiles: @@ -130,21 +145,14 @@ multiImages: - src/ubuntu/install/tools/** - src/ubuntu/install/cleanup/** - name: remmina + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-remmina changeFiles: - dockerfile-kasm-remmina - src/ubuntu/install/remmina/** - - name: slack - base: core-ubuntu-focal - dockerfile: dockerfile-kasm-slack - changeFiles: - - dockerfile-kasm-slack - - src/ubuntu/install/slack/** - - src/ubuntu/install/chrone/** - - src/ubuntu/install/tools/** - - src/ubuntu/install/cleanup/** - name: spiderfoot + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-spiderfoot changeFiles: @@ -154,18 +162,21 @@ multiImages: - src/ubuntu/install/tools/** - src/ubuntu/install/cleanup/** - name: sublime-text + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-sublime-text changeFiles: - dockerfile-kasm-sublime-text - src/ubuntu/install/sublime_text/** - name: telegram + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-telegram changeFiles: - dockerfile-kasm-telegram - src/ubuntu/install/telegram/** - name: terminal + singleapp: false base: core-ubuntu-focal dockerfile: dockerfile-kasm-terminal changeFiles: @@ -174,12 +185,14 @@ multiImages: - src/ubuntu/install/ansible/** - src/ubuntu/install/terminal/** - name: thunderbird + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-thunderbird changeFiles: - dockerfile-kasm-thunderbird - src/ubuntu/install/thunderbird/** - name: tor-browser + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-tor-browser changeFiles: @@ -187,6 +200,7 @@ multiImages: - src/ubuntu/install/gtk/** - src/ubuntu/install/torbrowser/** - name: ubuntu-focal-desktop + singleapp: false base: core-ubuntu-focal dockerfile: dockerfile-kasm-ubuntu-focal-desktop changeFiles: @@ -213,6 +227,7 @@ multiImages: - src/ubuntu/install/chrome/** - src/ubuntu/install/slack/** - name: ubuntu-focal-desktop-vpn + singleapp: false base: core-ubuntu-focal dockerfile: dockerfile-kasm-ubuntu-focal-desktop-vpn changeFiles: @@ -240,6 +255,7 @@ multiImages: - src/ubuntu/install/slack/** - src/ubuntu/install/vpn/** - name: ubuntu-jammy-desktop + singleapp: false base: core-ubuntu-jammy dockerfile: dockerfile-kasm-ubuntu-jammy-desktop changeFiles: @@ -266,18 +282,21 @@ multiImages: - src/ubuntu/install/chrome/** - src/ubuntu/install/slack/** - name: vlc + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-vlc changeFiles: - dockerfile-kasm-vlc - src/ubuntu/install/vlc/** - name: vs-code + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-vs-code changeFiles: - dockerfile-kasm-vs-code - src/ubuntu/install/vs_code/** - name: almalinux-8-desktop + singleapp: false base: core-almalinux-8 dockerfile: dockerfile-kasm-almalinux-8-desktop changeFiles: @@ -291,6 +310,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/slack/** - name: almalinux-9-desktop + singleapp: false base: core-almalinux-9 dockerfile: dockerfile-kasm-almalinux-9-desktop changeFiles: @@ -303,6 +323,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/slack/** - name: alpine-317-desktop + singleapp: false base: core-alpine-317 dockerfile: dockerfile-kasm-alpine-317-desktop changeFiles: @@ -311,6 +332,7 @@ multiImages: - src/ubuntu/install/cleanup/** - src/alpine/install/** - name: alpine-318-desktop + singleapp: false base: core-alpine-318 dockerfile: dockerfile-kasm-alpine-318-desktop changeFiles: @@ -319,6 +341,7 @@ multiImages: - src/ubuntu/install/cleanup/** - src/alpine/install/** - name: brave + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-brave changeFiles: @@ -326,6 +349,7 @@ multiImages: - src/ubuntu/install/gtk/** - src/ubuntu/install/brave/** - name: debian-bullseye-desktop + singleapp: false base: core-debian-bullseye dockerfile: dockerfile-kasm-debian-bullseye-desktop changeFiles: @@ -350,6 +374,7 @@ multiImages: - src/ubuntu/install/chrome/** - src/ubuntu/install/slack/** - name: debian-bookworm-desktop + singleapp: false base: core-debian-bookworm dockerfile: dockerfile-kasm-debian-bookworm-desktop changeFiles: @@ -374,6 +399,7 @@ multiImages: - src/ubuntu/install/chrome/** - src/ubuntu/install/slack/** - name: fedora-37-desktop + singleapp: false base: core-fedora-37 dockerfile: dockerfile-kasm-fedora-37-desktop changeFiles: @@ -386,6 +412,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/slack/** - name: fedora-38-desktop + singleapp: false base: core-fedora-38 dockerfile: dockerfile-kasm-fedora-38-desktop changeFiles: @@ -398,6 +425,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/slack/** - name: kali-rolling-desktop + singleapp: false base: core-kali-rolling dockerfile: dockerfile-kasm-kali-rolling-desktop changeFiles: @@ -406,12 +434,14 @@ multiImages: - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** - name: minetest + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-minetest changeFiles: - dockerfile-kasm-minetest - src/ubuntu/install/minetest/** - name: oracle-9-desktop + singleapp: false base: core-oracle-9 dockerfile: dockerfile-kasm-oracle-9-desktop changeFiles: @@ -424,6 +454,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/slack/** - name: parrotos-5-desktop + singleapp: false base: core-parrotos-5 dockerfile: dockerfile-kasm-parrotos-5-desktop changeFiles: @@ -433,12 +464,14 @@ multiImages: - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** - name: retroarch + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-retroarch changeFiles: - dockerfile-kasm-retroarch - src/ubuntu/install/retroarch/** - name: rockylinux-8-desktop + singleapp: false base: core-rockylinux-8 dockerfile: dockerfile-kasm-rockylinux-8-desktop changeFiles: @@ -452,6 +485,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/slack/** - name: rockylinux-9-desktop + singleapp: false base: core-rockylinux-9 dockerfile: dockerfile-kasm-rockylinux-9-desktop changeFiles: @@ -464,12 +498,14 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/slack/** - name: super-tux-kart + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-super-tux-kart changeFiles: - dockerfile-kasm-super-tux-kart - src/ubuntu/install/super_tux_kart/** - name: ubuntu-focal-dind + singleapp: false base: core-ubuntu-focal dockerfile: dockerfile-kasm-ubuntu-focal-dind changeFiles: @@ -483,6 +519,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/chrome/** - name: ubuntu-focal-dind-rootless + singleapp: false base: core-ubuntu-focal dockerfile: dockerfile-kasm-ubuntu-focal-dind-rootless changeFiles: @@ -496,6 +533,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/chrome/** - name: ubuntu-jammy-dind + singleapp: false base: core-ubuntu-jammy dockerfile: dockerfile-kasm-ubuntu-jammy-dind changeFiles: @@ -509,6 +547,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/chrome/** - name: ubuntu-jammy-dind-rootless + singleapp: false base: core-ubuntu-jammy dockerfile: dockerfile-kasm-ubuntu-jammy-dind-rootless changeFiles: @@ -523,6 +562,7 @@ multiImages: - src/ubuntu/install/chromium/** - src/ubuntu/install/chrome/** - name: vivaldi + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-vivaldi changeFiles: @@ -532,18 +572,21 @@ multiImages: - src/ubuntu/install/vivaldi/** singleImages: - name: atom + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-atom changeFiles: - dockerfile-kasm-atom - src/ubuntu/install/atom/** - name: blender + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-blender changeFiles: - dockerfile-kasm-blender - src/ubuntu/install/blender/** - name: centos-7-desktop + singleapp: false base: core-centos-7 dockerfile: dockerfile-kasm-centos-7-desktop changeFiles: @@ -553,6 +596,7 @@ singleImages: - src/ubuntu/install/cleanup/** - src/ubuntu/install/chrome/** - name: chrome + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-chrome changeFiles: @@ -561,6 +605,7 @@ singleImages: - src/ubuntu/install/certificates/** - src/ubuntu/install/chrome/** - name: desktop + singleapp: false base: core-ubuntu-focal dockerfile: dockerfile-kasm-desktop changeFiles: @@ -569,6 +614,7 @@ singleImages: - src/ubuntu/install/certificates/** - src/ubuntu/install/chrome/** - name: desktop-deluxe + singleapp: false base: core-ubuntu-focal dockerfile: dockerfile-kasm-desktop-deluxe changeFiles: @@ -591,12 +637,14 @@ singleImages: - src/ubuntu/install/ansible/** - src/ubuntu/install/chrome/** - name: discord + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-discord changeFiles: - dockerfile-kasm-discord - src/ubuntu/install/discord/** - name: edge + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-edge changeFiles: @@ -604,6 +652,7 @@ singleImages: - src/ubuntu/install/gtk/** - src/ubuntu/install/edge/** - name: hunchly + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-hunchly changeFiles: @@ -611,12 +660,14 @@ singleImages: - src/ubuntu/install/chrome/** - src/ubuntu/install/hunchly/** - name: insomnia + singleapp: true base: core-ubuntu-jammy dockerfile: dockerfile-kasm-insomnia changeFiles: - dockerfile-kasm-insomnia - src/ubuntu/install/insomnia/** - name: maltego + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-maltego changeFiles: @@ -624,11 +675,13 @@ singleImages: - src/ubuntu/install/maltego/** - src/ubuntu/install/firefox/** - name: only-office + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-only-office changeFiles: - dockerfile-kasm-only-office - name: oracle-7-desktop + singleapp: false base: core-oracle-7 dockerfile: dockerfile-kasm-oracle-7-desktop changeFiles: @@ -640,6 +693,7 @@ singleImages: - src/ubuntu/install/cleanup/** - src/ubuntu/install/chrome/** - name: postman + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-postman changeFiles: @@ -647,6 +701,7 @@ singleImages: - src/ubuntu/install/chrome/** - src/ubuntu/install/postman/** - name: remnux-focal-desktop + singleapp: false base: core-ubuntu-focal dockerfile: dockerfile-kasm-remnux-focal-desktop changeFiles: @@ -654,18 +709,31 @@ singleImages: - src/ubuntu/install/firefox/** - src/ubuntu/install/remnux/** - name: signal + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-signal changeFiles: - dockerfile-kasm-signal - src/ubuntu/install/signal/** + - name: slack + singleapp: true + base: core-ubuntu-focal + dockerfile: dockerfile-kasm-slack + changeFiles: + - dockerfile-kasm-slack + - src/ubuntu/install/slack/** + - src/ubuntu/install/chrome/** + - src/ubuntu/install/tools/** + - src/ubuntu/install/cleanup/** - name: steam + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-steam changeFiles: - dockerfile-kasm-steam - src/ubuntu/install/steam/** - name: tracelabs + singleapp: false base: core-kali-rolling dockerfile: dockerfile-kasm-tracelabs changeFiles: @@ -674,6 +742,7 @@ singleImages: - src/ubuntu/install/firefox/** - src/ubuntu/install/tracelabs/** - name: unityhub + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-unityhub changeFiles: @@ -682,6 +751,7 @@ singleImages: - src/ubuntu/install/chrome/** - src/ubuntu/install/unityhub/** - name: zoom + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-zoom changeFiles: @@ -689,6 +759,7 @@ singleImages: - src/ubuntu/install/zoom/** - src/ubuntu/install/chrome/** - name: zsnes + singleapp: true base: core-ubuntu-focal dockerfile: dockerfile-kasm-zsnes changeFiles: diff --git a/dockerfile-kasm-super-tux-kart b/dockerfile-kasm-super-tux-kart index 44bb633..0132a47 100644 --- a/dockerfile-kasm-super-tux-kart +++ b/dockerfile-kasm-super-tux-kart @@ -1,5 +1,5 @@ ARG BASE_TAG="develop" -ARG BASE_IMAGE="core-ubuntu-jammy" +ARG BASE_IMAGE="core-ubuntu-focal" FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root diff --git a/src/ubuntu/install/atom/install_atom.sh b/src/ubuntu/install/atom/install_atom.sh index bfd0d85..bb224e7 100644 --- a/src/ubuntu/install/atom/install_atom.sh +++ b/src/ubuntu/install/atom/install_atom.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -ex +# Install Atom wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | apt-key add - echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" \ > /etc/apt/sources.list.d/atom.list @@ -8,5 +9,18 @@ apt-get update apt-get install -y atom # Desktop Icon +sed -i 's#/usr/bin/atom#/usr/bin/atom --no-sandbox#g' /usr/share/applications/atom.desktop cp /usr/share/applications/atom.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/atom.desktop + +# Cleanup for app layer +chown -R 1000:0 $HOME +find /usr/share/ -name "icon-theme.cache" -exec rm -f {} \; +if [ -z ${SKIP_CLEAN+x} ]; then + apt-get autoclean + rm -rf \ + /var/lib/apt/lists/* \ + /var/tmp/* \ + /tmp/* +fi + diff --git a/src/ubuntu/install/audacity/install_audacity.sh b/src/ubuntu/install/audacity/install_audacity.sh index 193649a..1b28555 100644 --- a/src/ubuntu/install/audacity/install_audacity.sh +++ b/src/ubuntu/install/audacity/install_audacity.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash set -ex -apt-get update +# Install Audacity +apt-get update apt-get install -y audacity rm -rf \ /var/lib/apt/lists/* \ @@ -12,3 +13,14 @@ mkdir -p $HOME/.audacity-data/ cp /dockerstartup/install/audacity/audacity.cfg $HOME/.audacity-data/ cp /usr/share/applications/audacity.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/audacity.desktop + +# Cleanup for app layer +chown -R 1000:0 $HOME +find /usr/share/ -name "icon-theme.cache" -exec rm -f {} \; +if [ -z ${SKIP_CLEAN+x} ]; then + apt-get autoclean + rm -rf \ + /var/lib/apt/lists/* \ + /var/tmp/* \ + /tmp/* +fi diff --git a/src/ubuntu/install/blender/install_blender.sh b/src/ubuntu/install/blender/install_blender.sh index 89dd7a9..3df7497 100644 --- a/src/ubuntu/install/blender/install_blender.sh +++ b/src/ubuntu/install/blender/install_blender.sh @@ -41,3 +41,20 @@ EOF chmod +x /usr/bin/blender rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* + +# Desktop icon +sed -i 's#Icon=blender#Icon=/blender/blender.svg#g' /blender/blender.desktop +cp /blender/blender.desktop /usr/share/applications/ +cp /usr/share/applications/blender.desktop $HOME/Desktop/ +chmod +x $HOME/Desktop/blender.desktop + +# Cleanup for app layer +chown -R 1000:0 $HOME +find /usr/share/ -name "icon-theme.cache" -exec rm -f {} \; +if [ -z ${SKIP_CLEAN+x} ]; then + apt-get autoclean + rm -rf \ + /var/lib/apt/lists/* \ + /var/tmp/* \ + /tmp/* +fi diff --git a/src/ubuntu/install/brave/install_brave.sh b/src/ubuntu/install/brave/install_brave.sh index 4cce3bf..93b0981 100644 --- a/src/ubuntu/install/brave/install_brave.sh +++ b/src/ubuntu/install/brave/install_brave.sh @@ -19,6 +19,7 @@ sed -i 's/-stable//g' /usr/share/applications/brave-browser.desktop cp /usr/share/applications/brave-browser.desktop $HOME/Desktop/ chown 1000:1000 $HOME/Desktop/brave-browser.desktop +chmod +x $HOME/Desktop/brave-browser.desktop mv /usr/bin/brave-browser /usr/bin/brave-browser-orig cat >/usr/bin/brave-browser <>/usr/bin/x-www-browser <>/etc/brave/policies/managed/default_managed_policy.json <>/etc/opt/chrome/policies/managed/default_managed_policy.json <>/etc/chromium/policies/managed/default_managed_policy.json <$HOME/.local/share/chocolate-doom/chocolate-doom.cfg </usr/bin/desktop_ready </usr/bin/microsoft-edge-dev </usr/bin/microsoft-edge-stable <>/usr/bin/x-www-browser </usr/lib/hunchly/Hunchly </usr/share/applications/postman.desktop </usr/bin/desktop_ready </usr/share/applications/telegram.desktop <