From 672289e45ad2f48e8dd42b520c99543870e08a82 Mon Sep 17 00:00:00 2001 From: Ryan Kuba Date: Wed, 1 May 2024 19:17:17 +0000 Subject: [PATCH] Resolve KASM-5907 "Feature/ kasm 5854 fedora40 noble" --- ci-scripts/template-vars.yaml | 40 +++++++++++++ dockerfile-kasm-fedora-40-desktop | 53 +++++++++++++++++ dockerfile-kasm-ubuntu-noble-desktop | 57 +++++++++++++++++++ docs/fedora-40-desktop/README.md | 7 +++ docs/fedora-40-desktop/demo.txt | 9 +++ docs/fedora-40-desktop/description.txt | 1 + docs/ubuntu-noble-desktop/README.md | 7 +++ docs/ubuntu-noble-desktop/demo.txt | 9 +++ docs/ubuntu-noble-desktop/description.txt | 1 + src/oracle/install/ansible/install_ansible.sh | 2 +- src/oracle/install/gimp/install_gimp.sh | 2 +- .../libre_office/install_libre_office.sh | 2 +- .../only_office/install_only_office.sh | 2 +- src/oracle/install/slack/install_slack.sh | 2 +- .../sublime_text/install_sublime_text.sh | 2 +- .../install/terraform/install_terraform.sh | 2 +- src/oracle/install/vs_code/install_vs_code.sh | 4 +- src/oracle/install/zoom/install_zoom.sh | 2 +- src/ubuntu/install/ansible/install_ansible.sh | 2 +- .../install/chromium/install_chromium.sh | 6 +- src/ubuntu/install/cleanup/cleanup.sh | 2 +- src/ubuntu/install/doom/install_doom.sh | 2 +- src/ubuntu/install/firefox/install_firefox.sh | 30 +++++----- .../gtk/install_restricted_file_chooser.sh | 4 +- src/ubuntu/install/remmina/install_remmina.sh | 6 +- src/ubuntu/install/slack/install_slack.sh | 4 +- .../install/telegram/install_telegram.sh | 4 ++ .../thunderbird/install_thunderbird.sh | 6 +- src/ubuntu/install/vpn/install_vpn.sh | 2 +- 29 files changed, 230 insertions(+), 42 deletions(-) create mode 100644 dockerfile-kasm-fedora-40-desktop create mode 100644 dockerfile-kasm-ubuntu-noble-desktop create mode 100644 docs/fedora-40-desktop/README.md create mode 100644 docs/fedora-40-desktop/demo.txt create mode 100644 docs/fedora-40-desktop/description.txt create mode 100644 docs/ubuntu-noble-desktop/README.md create mode 100644 docs/ubuntu-noble-desktop/demo.txt create mode 100644 docs/ubuntu-noble-desktop/description.txt diff --git a/ci-scripts/template-vars.yaml b/ci-scripts/template-vars.yaml index f3ef4fb..1049868 100644 --- a/ci-scripts/template-vars.yaml +++ b/ci-scripts/template-vars.yaml @@ -290,6 +290,33 @@ multiImages: - src/ubuntu/install/ansible/** - src/ubuntu/install/chrome/** - src/ubuntu/install/slack/** + - name: ubuntu-noble-desktop + singleapp: false + base: core-ubuntu-noble + dockerfile: dockerfile-kasm-ubuntu-noble-desktop + changeFiles: + - dockerfile-kasm-ubuntu-noble-desktop + - src/ubuntu/install/zoom/** + - src/ubuntu/install/vs_code/** + - src/ubuntu/install/tools/** + - src/ubuntu/install/thunderbird/** + - src/ubuntu/install/terraform/** + - src/ubuntu/install/telegram/** + - src/ubuntu/install/sublime_text/** + - src/ubuntu/install/signal/** + - src/ubuntu/install/remmina/** + - src/ubuntu/install/only_office/** + - src/ubuntu/install/obs/** + - src/ubuntu/install/nextcloud/** + - src/ubuntu/install/misc/** + - src/ubuntu/install/gimp/** + - src/ubuntu/install/gamepad_utils/** + - src/ubuntu/install/firefox/** + - src/ubuntu/install/cleanup/** + - src/ubuntu/install/chromium/** + - src/ubuntu/install/ansible/** + - src/ubuntu/install/chrome/** + - src/ubuntu/install/slack/** - name: vlc singleapp: true base: core-ubuntu-focal @@ -455,6 +482,19 @@ multiImages: - src/ubuntu/install/cleanup/** - src/ubuntu/install/chromium/** - src/ubuntu/install/slack/** + - name: fedora-40-desktop + singleapp: false + base: core-fedora-40 + dockerfile: dockerfile-kasm-fedora-40-desktop + changeFiles: + - dockerfile-kasm-fedora-40-desktop + - src/oracle/install/** + - src/ubuntu/install/thunderbird/** + - src/ubuntu/install/remmina/** + - src/ubuntu/install/firefox/** + - src/ubuntu/install/cleanup/** + - src/ubuntu/install/chromium/** + - src/ubuntu/install/slack/** - name: kali-rolling-desktop singleapp: false base: core-kali-rolling diff --git a/dockerfile-kasm-fedora-40-desktop b/dockerfile-kasm-fedora-40-desktop new file mode 100644 index 0000000..bcbbcaa --- /dev/null +++ b/dockerfile-kasm-fedora-40-desktop @@ -0,0 +1,53 @@ +ARG BASE_TAG="develop" +ARG BASE_IMAGE="core-fedora-40" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG + +USER root + +ENV DISTRO=fedora40 +ENV HOME /home/kasm-default-profile +ENV STARTUPDIR /dockerstartup +WORKDIR $HOME + +### Envrionment config +ENV SKIP_CLEAN=true \ + KASM_RX_HOME=$STARTUPDIR/kasmrx \ + DONT_PROMPT_WSL_INSTALL="No_Prompt_please" \ + INST_DIR=$STARTUPDIR/install \ + INST_SCRIPTS="/oracle/install/tools/install_tools_deluxe.sh \ + /oracle/install/misc/install_tools.sh \ + /ubuntu/install/chromium/install_chromium.sh \ + /ubuntu/install/firefox/install_firefox.sh \ + /oracle/install/sublime_text/install_sublime_text.sh \ + /oracle/install/vs_code/install_vs_code.sh \ + /ubuntu/install/remmina/install_remmina.sh \ + /oracle/install/only_office/install_only_office.sh \ + /oracle/install/gimp/install_gimp.sh \ + /oracle/install/zoom/install_zoom.sh \ + /oracle/install/ansible/install_ansible.sh \ + /oracle/install/telegram/install_telegram.sh \ + /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ + /ubuntu/install/cleanup/cleanup.sh" + +# Copy install scripts +COPY ./src/ $INST_DIR + +# Run installations +RUN \ + for SCRIPT in $INST_SCRIPTS; do \ + bash ${INST_DIR}${SCRIPT} || exit 1; \ + done && \ + $STARTUPDIR/set_user_permission.sh $HOME && \ + rm -f /etc/X11/xinit/Xclients && \ + chown 1000:0 $HOME && \ + mkdir -p /home/kasm-user && \ + chown -R 1000:0 /home/kasm-user && \ + rm -Rf ${INST_DIR} + +# Userspace Runtime +ENV HOME /home/kasm-user +WORKDIR $HOME +USER 1000 + +CMD ["--tail-log"] diff --git a/dockerfile-kasm-ubuntu-noble-desktop b/dockerfile-kasm-ubuntu-noble-desktop new file mode 100644 index 0000000..a36e192 --- /dev/null +++ b/dockerfile-kasm-ubuntu-noble-desktop @@ -0,0 +1,57 @@ +ARG BASE_TAG="develop" +ARG BASE_IMAGE="core-ubuntu-noble" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG + +USER root + +ENV HOME /home/kasm-default-profile +ENV STARTUPDIR /dockerstartup +WORKDIR $HOME + +### Envrionment config +ENV DEBIAN_FRONTEND=noninteractive \ + SKIP_CLEAN=true \ + KASM_RX_HOME=$STARTUPDIR/kasmrx \ + DONT_PROMPT_WSL_INSTALL="No_Prompt_please" \ + INST_DIR=$STARTUPDIR/install \ + INST_SCRIPTS="/ubuntu/install/tools/install_tools_deluxe.sh \ + /ubuntu/install/misc/install_tools.sh \ + /ubuntu/install/chrome/install_chrome.sh \ + /ubuntu/install/chromium/install_chromium.sh \ + /ubuntu/install/firefox/install_firefox.sh \ + /ubuntu/install/sublime_text/install_sublime_text.sh \ + /ubuntu/install/vs_code/install_vs_code.sh \ + /ubuntu/install/nextcloud/install_nextcloud.sh \ + /ubuntu/install/remmina/install_remmina.sh \ + /ubuntu/install/only_office/install_only_office.sh \ + /ubuntu/install/signal/install_signal.sh \ + /ubuntu/install/gimp/install_gimp.sh \ + /ubuntu/install/zoom/install_zoom.sh \ + /ubuntu/install/ansible/install_ansible.sh \ + /ubuntu/install/telegram/install_telegram.sh \ + /ubuntu/install/thunderbird/install_thunderbird.sh \ + /ubuntu/install/slack/install_slack.sh \ + /ubuntu/install/gamepad_utils/install_gamepad_utils.sh \ + /ubuntu/install/cleanup/cleanup.sh" + +# Copy install scripts +COPY ./src/ $INST_DIR + +# Run installations +RUN \ + for SCRIPT in $INST_SCRIPTS; do \ + bash ${INST_DIR}${SCRIPT} || exit 1; \ + done && \ + $STARTUPDIR/set_user_permission.sh $HOME && \ + rm -f /etc/X11/xinit/Xclients && \ + chown 1000:0 $HOME && \ + mkdir -p /home/kasm-user && \ + chown -R 1000:0 /home/kasm-user && \ + rm -Rf ${INST_DIR} + +# Userspace Runtime +ENV HOME /home/kasm-user +WORKDIR $HOME +USER 1000 + +CMD ["--tail-log"] diff --git a/docs/fedora-40-desktop/README.md b/docs/fedora-40-desktop/README.md new file mode 100644 index 0000000..2ea974b --- /dev/null +++ b/docs/fedora-40-desktop/README.md @@ -0,0 +1,7 @@ +# About This Image + +This Image contains a browser-accessible Fedora 40 Desktop with various productivity and development apps installed. + +![Screenshot][Image_Screenshot] + +[Image_Screenshot]: https://info.kasmweb.com/hubfs/dockerhub/image-screenshots/fedora-37-desktop.png "Image Screenshot" diff --git a/docs/fedora-40-desktop/demo.txt b/docs/fedora-40-desktop/demo.txt new file mode 100644 index 0000000..0b606c7 --- /dev/null +++ b/docs/fedora-40-desktop/demo.txt @@ -0,0 +1,9 @@ +# Live Demo + + + +**Launch a real-time demo in a new browser window:** Live Demo. + + + +∗*Note: Demo is limited to 3 minutes and has upload/downloads restricted for security purposes.* diff --git a/docs/fedora-40-desktop/description.txt b/docs/fedora-40-desktop/description.txt new file mode 100644 index 0000000..b88a8b7 --- /dev/null +++ b/docs/fedora-40-desktop/description.txt @@ -0,0 +1 @@ +Fedora 40 desktop for Kasm Workspaces diff --git a/docs/ubuntu-noble-desktop/README.md b/docs/ubuntu-noble-desktop/README.md new file mode 100644 index 0000000..c01fb1c --- /dev/null +++ b/docs/ubuntu-noble-desktop/README.md @@ -0,0 +1,7 @@ +# About This Image + +This Image contains a browser-accessible Ubuntu Noble Desktop with various productivity and development apps installed. + +![Screenshot][Image_Screenshot] + +[Image_Screenshot]: https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/dockerhub/image-screenshots/ubuntu_jammy_desktop.png "Image Screenshot" diff --git a/docs/ubuntu-noble-desktop/demo.txt b/docs/ubuntu-noble-desktop/demo.txt new file mode 100644 index 0000000..0b606c7 --- /dev/null +++ b/docs/ubuntu-noble-desktop/demo.txt @@ -0,0 +1,9 @@ +# Live Demo + + + +**Launch a real-time demo in a new browser window:** Live Demo. + + + +∗*Note: Demo is limited to 3 minutes and has upload/downloads restricted for security purposes.* diff --git a/docs/ubuntu-noble-desktop/description.txt b/docs/ubuntu-noble-desktop/description.txt new file mode 100644 index 0000000..91d23d4 --- /dev/null +++ b/docs/ubuntu-noble-desktop/description.txt @@ -0,0 +1 @@ +Ubuntu productivity desktop for Kasm Workspaces \ No newline at end of file diff --git a/src/oracle/install/ansible/install_ansible.sh b/src/oracle/install/ansible/install_ansible.sh index d07cd32..e76efcf 100644 --- a/src/oracle/install/ansible/install_ansible.sh +++ b/src/oracle/install/ansible/install_ansible.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -ex -if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39) ]]; then +if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39|fedora40) ]]; then dnf install -y ansible if [ -z ${SKIP_CLEAN+x} ]; then dnf clean all diff --git a/src/oracle/install/gimp/install_gimp.sh b/src/oracle/install/gimp/install_gimp.sh index 83b370e..c72b185 100644 --- a/src/oracle/install/gimp/install_gimp.sh +++ b/src/oracle/install/gimp/install_gimp.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -ex -if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39) ]]; then +if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39|fedora40) ]]; then dnf install -y gimp if [ -z ${SKIP_CLEAN+x} ]; then dnf clean all diff --git a/src/oracle/install/libre_office/install_libre_office.sh b/src/oracle/install/libre_office/install_libre_office.sh index bf40005..5f9ce68 100644 --- a/src/oracle/install/libre_office/install_libre_office.sh +++ b/src/oracle/install/libre_office/install_libre_office.sh @@ -7,7 +7,7 @@ if [ "$ARCH" == "amd64" ] ; then exit 0 fi -if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39) ]]; then +if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39|fedora40) ]]; then dnf install -y \ libreoffice-core \ libreoffice-writer \ diff --git a/src/oracle/install/only_office/install_only_office.sh b/src/oracle/install/only_office/install_only_office.sh index 67bdfe8..26cac31 100644 --- a/src/oracle/install/only_office/install_only_office.sh +++ b/src/oracle/install/only_office/install_only_office.sh @@ -8,7 +8,7 @@ if [ "$ARCH" == "arm64" ] ; then fi curl -L -o only_office.rpm "https://download.onlyoffice.com/install/desktop/editors/linux/onlyoffice-desktopeditors.$(arch).rpm" -if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39) ]]; then +if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39|fedora40) ]]; then dnf localinstall -y only_office.rpm if [ -z ${SKIP_CLEAN+x} ]; then dnf clean all diff --git a/src/oracle/install/slack/install_slack.sh b/src/oracle/install/slack/install_slack.sh index 589efe7..28e9b7c 100644 --- a/src/oracle/install/slack/install_slack.sh +++ b/src/oracle/install/slack/install_slack.sh @@ -21,7 +21,7 @@ version=4.12.2 # This path may not be accurate once arm64 support arrives. Specifically I don't know if it will still be under x64 wget -q https://downloads.slack-edge.com/releases/linux/${version}/prod/x64/slack-${version}-0.1.fc21.x86_64.rpm -O slack.rpm -if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39) ]]; then +if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39|fedora40) ]]; then dnf localinstall -y slack.rpm if [ -z ${SKIP_CLEAN+x} ]; then dnf clean all diff --git a/src/oracle/install/sublime_text/install_sublime_text.sh b/src/oracle/install/sublime_text/install_sublime_text.sh index e5d41f8..f09887b 100644 --- a/src/oracle/install/sublime_text/install_sublime_text.sh +++ b/src/oracle/install/sublime_text/install_sublime_text.sh @@ -8,7 +8,7 @@ fi rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg -if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39) ]]; then +if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39|fedora40) ]]; then dnf config-manager --add-repo https://download.sublimetext.com/rpm/stable/$(arch)/sublime-text.repo dnf install -y sublime-text if [ -z ${SKIP_CLEAN+x} ]; then diff --git a/src/oracle/install/terraform/install_terraform.sh b/src/oracle/install/terraform/install_terraform.sh index 3d16e87..aecc842 100644 --- a/src/oracle/install/terraform/install_terraform.sh +++ b/src/oracle/install/terraform/install_terraform.sh @@ -14,7 +14,7 @@ if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almali if [ -z ${SKIP_CLEAN+x} ]; then dnf clean all fi -elif [[ "${DISTRO}" == @(fedora37|fedora38|fedora39) ]]; then +elif [[ "${DISTRO}" == @(fedora37|fedora38|fedora39|fedora40) ]]; then dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo dnf install -y terraform if [ -z ${SKIP_CLEAN+x} ]; then diff --git a/src/oracle/install/vs_code/install_vs_code.sh b/src/oracle/install/vs_code/install_vs_code.sh index f5d4058..def2b44 100644 --- a/src/oracle/install/vs_code/install_vs_code.sh +++ b/src/oracle/install/vs_code/install_vs_code.sh @@ -3,7 +3,7 @@ set -ex ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/x64/g') wget -q https://update.code.visualstudio.com/latest/linux-rpm-${ARCH}/stable -O vs_code.rpm -if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39) ]]; then +if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39|fedora40) ]]; then wget -q https://update.code.visualstudio.com/latest/linux-rpm-${ARCH}/stable -O vs_code.rpm dnf localinstall -y vs_code.rpm else @@ -20,7 +20,7 @@ chown 1000:1000 $HOME/Desktop/code.desktop rm vs_code.rpm # Conveniences for python development -if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39) ]]; then +if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39|fedora40) ]]; then dnf install -y python3-setuptools python3-virtualenv if [ -z ${SKIP_CLEAN+x} ]; then dnf clean all diff --git a/src/oracle/install/zoom/install_zoom.sh b/src/oracle/install/zoom/install_zoom.sh index 8d3ccd1..4bcc98b 100644 --- a/src/oracle/install/zoom/install_zoom.sh +++ b/src/oracle/install/zoom/install_zoom.sh @@ -8,7 +8,7 @@ fi wget -q https://zoom.us/client/latest/zoom_$(arch).rpm -if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39) ]]; then +if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39|fedora40) ]]; then dnf localinstall -y zoom_$(arch).rpm if [ -z ${SKIP_CLEAN+x} ]; then dnf clean all diff --git a/src/ubuntu/install/ansible/install_ansible.sh b/src/ubuntu/install/ansible/install_ansible.sh index e5eba5c..6fb9906 100644 --- a/src/ubuntu/install/ansible/install_ansible.sh +++ b/src/ubuntu/install/ansible/install_ansible.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -ex -if grep -q "ID=debian" /etc/os-release; then +if grep -q "ID=debian" /etc/os-release || grep -q "VERSION_CODENAME=noble" /etc/os-release; then apt-get update apt-get install -y ansible else diff --git a/src/ubuntu/install/chromium/install_chromium.sh b/src/ubuntu/install/chromium/install_chromium.sh index 15fc092..30b786d 100644 --- a/src/ubuntu/install/chromium/install_chromium.sh +++ b/src/ubuntu/install/chromium/install_chromium.sh @@ -9,8 +9,8 @@ if [[ "${DISTRO}" == @(debian|opensuse|ubuntu) ]] && [ ${ARCH} = 'amd64' ] && [ exit 0 fi -if [[ "${DISTRO}" == @(centos|oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39) ]]; then - if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39) ]]; then +if [[ "${DISTRO}" == @(centos|oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39|fedora40) ]]; then + if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|fedora37|fedora38|fedora39|fedora40) ]]; then dnf install -y chromium if [ -z ${SKIP_CLEAN+x} ]; then dnf clean all @@ -124,7 +124,7 @@ if [ "${DISTRO}" != "opensuse" ] && ! grep -q "ID=debian" /etc/os-release && ! g cp /usr/bin/chromium-browser /usr/bin/chromium fi -if [[ "${DISTRO}" == @(centos|oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|opensuse|fedora37|fedora38|fedora39) ]]; then +if [[ "${DISTRO}" == @(centos|oracle8|rockylinux9|rockylinux8|oracle9|almalinux9|almalinux8|opensuse|fedora37|fedora38|fedora39|fedora40) ]]; then cat >> $HOME/.config/mimeapps.list <"$preferences_file" <>$HOME/.mozilla/firefox/profiles.ini <>$HOME/.mozilla/firefox/profiles.ini <