From cd129cd1949e2f67f213c5e858abbc4a2a5171e0 Mon Sep 17 00:00:00 2001 From: Richard Koliser Date: Wed, 23 Mar 2022 17:03:54 -0400 Subject: [PATCH 1/6] KASM-2193 Remove Maximus usage from older Bionic images. --- dockerfile-kasm-desktop-deluxe | 3 --- dockerfile-kasm-java-dev | 3 --- dockerfile-kasm-ubuntu-focal-desktop | 3 --- dockerfile-kasm-ubuntu-focal-dind | 3 --- dockerfile-kasm-ubuntu-focal-dind-rootless | 3 --- src/ubuntu/install/dind_rootless/custom_startup.sh | 4 ---- src/ubuntu/install/discord/install_discord.sh | 5 +---- src/ubuntu/install/gimp/install_gimp.sh | 5 +---- src/ubuntu/install/insomnia/install_insomnia.sh | 6 ------ src/ubuntu/install/only_office/install_only_office.sh | 6 ------ src/ubuntu/install/postman/install_postman.sh | 6 ------ src/ubuntu/install/signal/install_signal.sh | 5 +---- src/ubuntu/install/slack/install_slack.sh | 5 +---- src/ubuntu/install/steam/install_steam.sh | 5 +---- src/ubuntu/install/sublime_text/install_sublime_text.sh | 4 ---- src/ubuntu/install/vlc/install_vlc.sh | 4 ---- src/ubuntu/install/vs_code/install_vs_code.sh | 5 ----- src/ubuntu/install/zoom/install_zoom.sh | 4 ---- src/ubuntu/install/zsnes/install_zsnes.sh | 4 ---- 19 files changed, 5 insertions(+), 78 deletions(-) diff --git a/dockerfile-kasm-desktop-deluxe b/dockerfile-kasm-desktop-deluxe index f3fa79e..2aaf146 100644 --- a/dockerfile-kasm-desktop-deluxe +++ b/dockerfile-kasm-desktop-deluxe @@ -96,9 +96,6 @@ RUN bash $INST_SCRIPTS/terraform/install_terraform.sh && rm -rf $INST_SCRIPTS/t COPY ./src/ubuntu/install/telegram $INST_SCRIPTS/telegram/ RUN bash $INST_SCRIPTS/telegram/install_telegram.sh && rm -rf $INST_SCRIPTS/telegram/ -### Remove maxmius -RUN if [[ ${BASE_IMAGE} =~ "bionic" ]]; then apt-get remove -y maximus; fi; - #ADD ./src/common/scripts $STARTUPDIR RUN $STARTUPDIR/set_user_permission.sh $HOME diff --git a/dockerfile-kasm-java-dev b/dockerfile-kasm-java-dev index f81cfb8..ed4bc59 100644 --- a/dockerfile-kasm-java-dev +++ b/dockerfile-kasm-java-dev @@ -55,9 +55,6 @@ RUN apt-get update && apt-get install -y default-jdk default-jre COPY ./src/ubuntu/install/eclipse $INST_SCRIPTS/eclipse RUN bash $INST_SCRIPTS/eclipse/install_eclipse.sh && rm -rf $INST_SCRIPTS/eclipse/ -### Remove maxmius -RUN if [[ ${BASE_IMAGE} =~ "bionic" ]]; then apt-get remove -y maximus; fi; - #ADD ./src/common/scripts $STARTUPDIR RUN $STARTUPDIR/set_user_permission.sh $HOME diff --git a/dockerfile-kasm-ubuntu-focal-desktop b/dockerfile-kasm-ubuntu-focal-desktop index 8ff043f..5d140cc 100644 --- a/dockerfile-kasm-ubuntu-focal-desktop +++ b/dockerfile-kasm-ubuntu-focal-desktop @@ -92,9 +92,6 @@ RUN bash $INST_SCRIPTS/terraform/install_terraform.sh && rm -rf $INST_SCRIPTS/t COPY ./src/ubuntu/install/telegram $INST_SCRIPTS/telegram/ RUN bash $INST_SCRIPTS/telegram/install_telegram.sh && rm -rf $INST_SCRIPTS/telegram/ -### Remove maxmius -RUN if [[ ${BASE_IMAGE} =~ "bionic" ]]; then apt-get remove -y maximus; fi; - #ADD ./src/common/scripts $STARTUPDIR RUN $STARTUPDIR/set_user_permission.sh $HOME diff --git a/dockerfile-kasm-ubuntu-focal-dind b/dockerfile-kasm-ubuntu-focal-dind index 7b5d698..8334d38 100644 --- a/dockerfile-kasm-ubuntu-focal-dind +++ b/dockerfile-kasm-ubuntu-focal-dind @@ -49,9 +49,6 @@ RUN bash $INST_SCRIPTS/vs_code/install_vs_code.sh && rm -rf $INST_SCRIPTS/vs_co COPY ./src/ubuntu/install/chrome $INST_SCRIPTS/chrome/ RUN bash $INST_SCRIPTS/chrome/install_chrome.sh && rm -rf $INST_SCRIPTS/chrome/ -### Remove maxmius -RUN if [[ ${BASE_IMAGE} =~ "bionic" ]]; then apt-get remove -y maximus; fi; - ######### End Customizations ########### RUN chown 1000:0 $HOME diff --git a/dockerfile-kasm-ubuntu-focal-dind-rootless b/dockerfile-kasm-ubuntu-focal-dind-rootless index a4ceaeb..68b8523 100644 --- a/dockerfile-kasm-ubuntu-focal-dind-rootless +++ b/dockerfile-kasm-ubuntu-focal-dind-rootless @@ -46,9 +46,6 @@ RUN bash $INST_SCRIPTS/vs_code/install_vs_code.sh && rm -rf $INST_SCRIPTS/vs_co COPY ./src/ubuntu/install/chrome $INST_SCRIPTS/chrome/ RUN bash $INST_SCRIPTS/chrome/install_chrome.sh && rm -rf $INST_SCRIPTS/chrome/ -### Remove maxmius -RUN if [[ ${BASE_IMAGE} =~ "bionic" ]]; then apt-get remove -y maximus; fi; - RUN chown 1000:0 $HOME USER 1000 diff --git a/src/ubuntu/install/dind_rootless/custom_startup.sh b/src/ubuntu/install/dind_rootless/custom_startup.sh index e655bc6..fab288d 100644 --- a/src/ubuntu/install/dind_rootless/custom_startup.sh +++ b/src/ubuntu/install/dind_rootless/custom_startup.sh @@ -55,10 +55,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null diff --git a/src/ubuntu/install/discord/install_discord.sh b/src/ubuntu/install/discord/install_discord.sh index fbe37ed..131226e 100644 --- a/src/ubuntu/install/discord/install_discord.sh +++ b/src/ubuntu/install/discord/install_discord.sh @@ -1,10 +1,7 @@ #!/usr/bin/env bash set -ex apt-get update -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get install -y maximus -fi + curl -L -o discord.deb "https://discord.com/api/download?platform=linux&format=deb" apt-get install -y ./discord.deb rm discord.deb diff --git a/src/ubuntu/install/gimp/install_gimp.sh b/src/ubuntu/install/gimp/install_gimp.sh index 3cecb4d..c0068c8 100644 --- a/src/ubuntu/install/gimp/install_gimp.sh +++ b/src/ubuntu/install/gimp/install_gimp.sh @@ -1,10 +1,7 @@ #!/usr/bin/env bash set -ex apt-get update -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get install -y maximus -fi + apt-get install -y gimp cp /usr/share/applications/gimp.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/gimp.desktop \ No newline at end of file diff --git a/src/ubuntu/install/insomnia/install_insomnia.sh b/src/ubuntu/install/insomnia/install_insomnia.sh index af92123..bf29c6c 100644 --- a/src/ubuntu/install/insomnia/install_insomnia.sh +++ b/src/ubuntu/install/insomnia/install_insomnia.sh @@ -9,9 +9,3 @@ cp /usr/share/applications/insomnia.desktop $HOME/Desktop chmod +x $HOME/Desktop/insomnia.desktop chown 1000:1000 $HOME/Desktop/insomnia.desktop rm insomnia.deb - -# Conveniences for python development -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get install -y maximus -fi diff --git a/src/ubuntu/install/only_office/install_only_office.sh b/src/ubuntu/install/only_office/install_only_office.sh index 57eab8b..e5cc2e9 100644 --- a/src/ubuntu/install/only_office/install_only_office.sh +++ b/src/ubuntu/install/only_office/install_only_office.sh @@ -17,9 +17,3 @@ sed -i 's/ONLYOFFICE Desktop Editors/ONLYOFFICE/g' $HOME/Desktop/onlyoffice-desk chmod +x $HOME/Desktop/onlyoffice-desktopeditors.desktop # KASM-1541 sed -i 's#/usr/bin/onlyoffice-desktopeditors %U$#bash -c "source ~/.bashrc \&\& /usr/bin/onlyoffice-desktopeditors %U"#' /usr/share/applications/onlyoffice-desktopeditors.desktop - -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get update - apt-get install -y maximus -fi diff --git a/src/ubuntu/install/postman/install_postman.sh b/src/ubuntu/install/postman/install_postman.sh index ab2c6e1..5aaebb2 100644 --- a/src/ubuntu/install/postman/install_postman.sh +++ b/src/ubuntu/install/postman/install_postman.sh @@ -19,9 +19,3 @@ chmod +x /usr/share/applications/postman.desktop cp /usr/share/applications/postman.desktop $HOME/Desktop/postman.desktop chmod +x $HOME/Desktop/postman.desktop chown 1000:1000 $HOME/Desktop/postman.desktop - -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get update - apt-get install -y maximus -fi diff --git a/src/ubuntu/install/signal/install_signal.sh b/src/ubuntu/install/signal/install_signal.sh index 90cd6f3..f562e68 100644 --- a/src/ubuntu/install/signal/install_signal.sh +++ b/src/ubuntu/install/signal/install_signal.sh @@ -12,10 +12,7 @@ fi wget -O- https://updates.signal.org/desktop/apt/keys.asc | apt-key add - echo "deb [arch=${ARCH}] https://updates.signal.org/desktop/apt xenial main" | tee -a /etc/apt/sources.list.d/signal-xenial.list apt-get update -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get install -y maximus -fi + apt-get install -y signal-desktop cp /usr/share/applications/signal-desktop.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/signal-desktop.desktop diff --git a/src/ubuntu/install/slack/install_slack.sh b/src/ubuntu/install/slack/install_slack.sh index 40a4c7c..b4f4e23 100644 --- a/src/ubuntu/install/slack/install_slack.sh +++ b/src/ubuntu/install/slack/install_slack.sh @@ -22,10 +22,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-desktop-${version}-${ARCH}.deb apt-get update -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get install -y maximus -fi + apt-get install -y ./slack-desktop-${version}-${ARCH}.deb rm slack-desktop-${version}-${ARCH}.deb sed -i 's,/usr/bin/slack,/usr/bin/slack --no-sandbox,g' /usr/share/applications/slack.desktop diff --git a/src/ubuntu/install/steam/install_steam.sh b/src/ubuntu/install/steam/install_steam.sh index e9228ff..2a4f4a5 100644 --- a/src/ubuntu/install/steam/install_steam.sh +++ b/src/ubuntu/install/steam/install_steam.sh @@ -2,10 +2,7 @@ set -ex dpkg --add-architecture i386 apt-get update -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get install -y maximus -fi + apt-get install -y steam-installer cp /usr/share/applications/steam.desktop $HOME/Desktop/ chmod +x $HOME/Desktop/steam.desktop diff --git a/src/ubuntu/install/sublime_text/install_sublime_text.sh b/src/ubuntu/install/sublime_text/install_sublime_text.sh index d0c4313..4d042b0 100644 --- a/src/ubuntu/install/sublime_text/install_sublime_text.sh +++ b/src/ubuntu/install/sublime_text/install_sublime_text.sh @@ -13,10 +13,6 @@ apt-get install -y apt-transport-https echo "deb https://download.sublimetext.com/ apt/stable/" | tee /etc/apt/sources.list.d/sublime-text.list apt-get update -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get install -y maximus -fi apt-get install -y sublime-text cp /usr/share/applications/sublime_text.desktop $HOME/Desktop/ diff --git a/src/ubuntu/install/vlc/install_vlc.sh b/src/ubuntu/install/vlc/install_vlc.sh index eab3a87..c49dc51 100644 --- a/src/ubuntu/install/vlc/install_vlc.sh +++ b/src/ubuntu/install/vlc/install_vlc.sh @@ -1,8 +1,4 @@ #!/usr/bin/env bash set -ex apt-get update -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get install -y maximus -fi apt-get install -y vlc \ No newline at end of file diff --git a/src/ubuntu/install/vs_code/install_vs_code.sh b/src/ubuntu/install/vs_code/install_vs_code.sh index e59545a..f9e24a5 100644 --- a/src/ubuntu/install/vs_code/install_vs_code.sh +++ b/src/ubuntu/install/vs_code/install_vs_code.sh @@ -15,8 +15,3 @@ apt-get update apt-get install -y python3-setuptools \ python3-venv \ python3-virtualenv - -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get install -y maximus -fi diff --git a/src/ubuntu/install/zoom/install_zoom.sh b/src/ubuntu/install/zoom/install_zoom.sh index 1d1d7b1..4cc11d1 100644 --- a/src/ubuntu/install/zoom/install_zoom.sh +++ b/src/ubuntu/install/zoom/install_zoom.sh @@ -11,10 +11,6 @@ fi wget -q https://zoom.us/client/latest/zoom_${ARCH}.deb apt-get update -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get install -y maximus -fi apt-get install -y ./zoom_${ARCH}.deb rm zoom_amd64.deb cp /usr/share/applications/Zoom.desktop $HOME/Desktop/ diff --git a/src/ubuntu/install/zsnes/install_zsnes.sh b/src/ubuntu/install/zsnes/install_zsnes.sh index a5e03f1..98a56c4 100644 --- a/src/ubuntu/install/zsnes/install_zsnes.sh +++ b/src/ubuntu/install/zsnes/install_zsnes.sh @@ -2,10 +2,6 @@ set -ex dpkg --add-architecture i386 apt-get update -if [[ "$(lsb_release -cs)" == "bionic" ]]; -then - apt-get install -y maximus -fi apt-get install -y zsnes From ed08d9749a36f5deed17a7f4b44c677f5b98e37a Mon Sep 17 00:00:00 2001 From: Richard Koliser Date: Wed, 23 Mar 2022 17:11:48 -0400 Subject: [PATCH 2/6] KASM-2193 Removed the use of the private arg to docker files Also fixed up the if condition logic for private variable in gitlab-ci --- .gitlab-ci.yml | 47 +++++++++++++--------- dockerfile-kasm-centos-7-desktop | 4 +- dockerfile-kasm-tracelabs | 4 +- dockerfile-kasm-ubuntu-focal-desktop | 4 +- dockerfile-kasm-ubuntu-focal-dind | 4 +- dockerfile-kasm-ubuntu-focal-dind-rootless | 4 +- 6 files changed, 39 insertions(+), 28 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e81d22b..aedf121 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,7 +34,7 @@ build_browser_images: - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt # Check for private variable to build against private core images - - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . only: @@ -63,7 +63,7 @@ build_app_images: - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt # Check for private variable to build against private core images - - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . only: @@ -92,9 +92,9 @@ build_ubuntu_desktop_images: - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt # Check for private variable to build against private core images - - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; CORE_IMAGE=$CORE_IMAGE-private; else PRIVATE=""; fi; + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; - - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg PRIVATE=$PRIVATE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . only: - develop - /^release\/.*$/ @@ -120,10 +120,13 @@ build_non_ubuntu: # Ensure readme and description files are present - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt + # Set base image based on kasm_image variable + - if [[ $KASM_IMAGE =~ 'centos-7-desktop' ]]; then CORE_IMAGE=core-centos-7; fi + - if [[ $KASM_IMAGE =~ 'tracelabs' ]]; then CORE_IMAGE=core-kali-rolling; fi # Check for private variable to build against private core images - - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; else PRIVATE=""; fi; + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; - - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg PRIVATE=$PRIVATE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . only: - develop - /^release\/.*$/ @@ -154,7 +157,7 @@ build_dev_browser_images: - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt # Check for private variable to build against private core images - - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. # The only way to push multiple architectures to the same tag is to use buildx. @@ -183,7 +186,7 @@ build_dev_app_images: - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt # Check for private variable to build against private core images - - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. # The only way to push multiple architectures to the same tag is to use buildx. @@ -212,11 +215,11 @@ build_dev_ubuntu_desktop_images: - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt # Check for private variable to build against private core images - - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; CORE_IMAGE=$CORE_IMAGE-private; else PRIVATE=""; fi; + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. # The only way to push multiple architectures to the same tag is to use buildx. - - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH --build-arg PRIVATE=$PRIVATE --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . except: - develop - /^release\/.*$/ @@ -240,11 +243,15 @@ build_dev_non_ubuntu: # Ensure readme and description files are present - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt - - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; else PRIVATE=""; fi; + # Set base image based on kasm_image variable + - if [[ $KASM_IMAGE =~ 'centos-7-desktop' ]]; then CORE_IMAGE=core-centos-7; fi + - if [[ $KASM_IMAGE =~ 'tracelabs' ]]; then CORE_IMAGE=core-kali-rolling; fi + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. # The only way to push multiple architectures to the same tag is to use buildx. - - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH --build-arg PRIVATE=$PRIVATE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG=$CORE_IMAGE_TAG -f dockerfile-kasm-$KASM_IMAGE . except: - develop - /^release\/.*$/ @@ -271,7 +278,7 @@ build_schedules_browser_images: - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt # Check for private variable to build against private core images - - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. # The only way to push multiple architectures to the same tag is to use buildx. @@ -300,7 +307,7 @@ build_schedules_app_images: - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt # Check for private variable to build against private core images - - if [[ $USE_PRIVATE_IMAGES ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. # The only way to push multiple architectures to the same tag is to use buildx. @@ -329,11 +336,11 @@ build_schedules_ubuntu_desktop_images: - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt # Check for private variable to build against private core images - - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; CORE_IMAGE=$CORE_IMAGE-private; else PRIVATE=""; fi; + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. # The only way to push multiple architectures to the same tag is to use buildx. - - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg PRIVATE=$PRIVATE --build-arg BASE_TAG="$SANITIZED_ROLLING_BRANCH" -f dockerfile-kasm-$KASM_IMAGE . + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG="$SANITIZED_ROLLING_BRANCH" -f dockerfile-kasm-$KASM_IMAGE . only: - schedules tags: @@ -356,11 +363,15 @@ build_schedules_non_ubuntu: # Ensure readme and description files are present - ls docs/$KASM_IMAGE/README.md - ls docs/$KASM_IMAGE/description.txt - - if [[ $USE_PRIVATE_IMAGES ]]; then PRIVATE=-private; else PRIVATE=""; fi; + # Set base image based on kasm_image variable + - if [[ $KASM_IMAGE =~ 'centos-7-desktop' ]]; then CORE_IMAGE=core-centos-7; fi + - if [[ $KASM_IMAGE =~ 'tracelabs' ]]; then CORE_IMAGE=core-kali-rolling; fi + # Check for private variable to build against private core images + - if [[ $USE_PRIVATE_IMAGES -eq 1 ]]; then CORE_IMAGE=$CORE_IMAGE-private; fi; # Equivalent to docker build and docker push. Builds amd64 natively uses qemu for arm64. # The only way to push multiple architectures to the same tag is to use buildx. - - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg PRIVATE=$PRIVATE --build-arg BASE_TAG="$SANITIZED_ROLLING_BRANCH" -f dockerfile-kasm-$KASM_IMAGE . + - docker buildx build --push --platform $BUILD_PLATFORM -t ${ORG_NAME}/$KASM_IMAGE:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/$KASM_IMAGE-private:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE=$CORE_IMAGE --build-arg BASE_TAG="$SANITIZED_ROLLING_BRANCH" -f dockerfile-kasm-$KASM_IMAGE . only: - schedules tags: diff --git a/dockerfile-kasm-centos-7-desktop b/dockerfile-kasm-centos-7-desktop index c5d763b..65643bf 100644 --- a/dockerfile-kasm-centos-7-desktop +++ b/dockerfile-kasm-centos-7-desktop @@ -1,6 +1,6 @@ ARG BASE_TAG="develop" -ARG PRIVATE="" -FROM kasmweb/core-centos-7$PRIVATE:$BASE_TAG +ARG BASE_IMAGE="core-centos-7" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV DISTRO=centos diff --git a/dockerfile-kasm-tracelabs b/dockerfile-kasm-tracelabs index 298e183..f99e0f5 100644 --- a/dockerfile-kasm-tracelabs +++ b/dockerfile-kasm-tracelabs @@ -1,6 +1,6 @@ ARG BASE_TAG="develop" -ARG PRIVATE="" -FROM kasmweb/core-kali-rolling$PRIVATE:$BASE_TAG +ARG BASE_IMAGE="core-kali-rolling" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile diff --git a/dockerfile-kasm-ubuntu-focal-desktop b/dockerfile-kasm-ubuntu-focal-desktop index 5d140cc..2d239ac 100644 --- a/dockerfile-kasm-ubuntu-focal-desktop +++ b/dockerfile-kasm-ubuntu-focal-desktop @@ -1,6 +1,6 @@ ARG BASE_TAG="develop" -ARG PRIVATE="" -FROM kasmweb/core-ubuntu-focal$PRIVATE:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root diff --git a/dockerfile-kasm-ubuntu-focal-dind b/dockerfile-kasm-ubuntu-focal-dind index 8334d38..d95c697 100644 --- a/dockerfile-kasm-ubuntu-focal-dind +++ b/dockerfile-kasm-ubuntu-focal-dind @@ -1,6 +1,6 @@ ARG BASE_TAG="develop" -ARG PRIVATE="" -FROM kasmweb/core-ubuntu-focal$PRIVATE:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile diff --git a/dockerfile-kasm-ubuntu-focal-dind-rootless b/dockerfile-kasm-ubuntu-focal-dind-rootless index 68b8523..547b1cb 100644 --- a/dockerfile-kasm-ubuntu-focal-dind-rootless +++ b/dockerfile-kasm-ubuntu-focal-dind-rootless @@ -1,6 +1,6 @@ ARG BASE_TAG="develop" -ARG PRIVATE="" -FROM kasmweb/core-ubuntu-focal$PRIVATE:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile From e03153a3c97fae70f9de76f05ee1ad3b87a51daf Mon Sep 17 00:00:00 2001 From: Richard Koliser Date: Wed, 23 Mar 2022 17:15:14 -0400 Subject: [PATCH 3/6] KASM-2193 Removed unused env variable BASE_IMAGE --- dockerfile-kasm-brave | 1 - dockerfile-kasm-chrome | 1 - dockerfile-kasm-chrome-flash | 1 - dockerfile-kasm-chromium | 1 - dockerfile-kasm-desktop | 1 - dockerfile-kasm-desktop-deluxe | 1 - dockerfile-kasm-discord | 1 - dockerfile-kasm-doom | 1 - dockerfile-kasm-edge | 1 - dockerfile-kasm-firefox | 1 - dockerfile-kasm-firefox-flash | 1 - dockerfile-kasm-firefox-mobile | 1 - dockerfile-kasm-gimp | 1 - dockerfile-kasm-hunchly | 1 - dockerfile-kasm-insomnia | 1 - dockerfile-kasm-java-dev | 1 - dockerfile-kasm-maltego | 1 - dockerfile-kasm-only-office | 1 - dockerfile-kasm-postman | 1 - dockerfile-kasm-rdesktop | 1 - dockerfile-kasm-remmina | 1 - dockerfile-kasm-signal | 1 - dockerfile-kasm-slack | 1 - dockerfile-kasm-steam | 1 - dockerfile-kasm-sublime-text | 1 - dockerfile-kasm-teams | 1 - dockerfile-kasm-telegram | 1 - dockerfile-kasm-terminal | 1 - dockerfile-kasm-tor-browser | 1 - dockerfile-kasm-ubuntu-focal-desktop | 1 - dockerfile-kasm-ubuntu-focal-dind | 1 - dockerfile-kasm-ubuntu-focal-dind-rootless | 1 - dockerfile-kasm-vlc | 1 - dockerfile-kasm-vmware-horizon | 1 - dockerfile-kasm-vs-code | 1 - dockerfile-kasm-zoom | 1 - dockerfile-kasm-zsnes | 1 - 37 files changed, 37 deletions(-) diff --git a/dockerfile-kasm-brave b/dockerfile-kasm-brave index 9270810..3ef8f32 100644 --- a/dockerfile-kasm-brave +++ b/dockerfile-kasm-brave @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-chrome b/dockerfile-kasm-chrome index e23768b..aaf4046 100644 --- a/dockerfile-kasm-chrome +++ b/dockerfile-kasm-chrome @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-chrome-flash b/dockerfile-kasm-chrome-flash index d4d8040..30837e8 100644 --- a/dockerfile-kasm-chrome-flash +++ b/dockerfile-kasm-chrome-flash @@ -7,7 +7,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-chromium b/dockerfile-kasm-chromium index 73dea1f..5e843de 100644 --- a/dockerfile-kasm-chromium +++ b/dockerfile-kasm-chromium @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-desktop b/dockerfile-kasm-desktop index f77a61a..ec45dcf 100644 --- a/dockerfile-kasm-desktop +++ b/dockerfile-kasm-desktop @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-desktop-deluxe b/dockerfile-kasm-desktop-deluxe index 2aaf146..565ecc5 100644 --- a/dockerfile-kasm-desktop-deluxe +++ b/dockerfile-kasm-desktop-deluxe @@ -12,7 +12,6 @@ WORKDIR $HOME ENV DEBIAN_FRONTEND noninteractive ENV KASM_RX_HOME $STARTUPDIR/kasmrx ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE # Add Kasm Branding RUN cp /usr/share/extra/backgrounds/bg_kasm.png /usr/share/extra/backgrounds/bg_default.png diff --git a/dockerfile-kasm-discord b/dockerfile-kasm-discord index 10fc9dd..fc084c8 100644 --- a/dockerfile-kasm-discord +++ b/dockerfile-kasm-discord @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-doom b/dockerfile-kasm-doom index 3a3a966..4589f65 100644 --- a/dockerfile-kasm-doom +++ b/dockerfile-kasm-doom @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-edge b/dockerfile-kasm-edge index 0153b91..20a5b28 100644 --- a/dockerfile-kasm-edge +++ b/dockerfile-kasm-edge @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-firefox b/dockerfile-kasm-firefox index e1357ed..5b118d8 100644 --- a/dockerfile-kasm-firefox +++ b/dockerfile-kasm-firefox @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-firefox-flash b/dockerfile-kasm-firefox-flash index 8094c8a..5b0c834 100644 --- a/dockerfile-kasm-firefox-flash +++ b/dockerfile-kasm-firefox-flash @@ -7,7 +7,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-firefox-mobile b/dockerfile-kasm-firefox-mobile index 26419ad..d4293b1 100644 --- a/dockerfile-kasm-firefox-mobile +++ b/dockerfile-kasm-firefox-mobile @@ -12,7 +12,6 @@ WORKDIR $HOME ENV DEBIAN_FRONTEND noninteractive ENV KASM_RX_HOME $STARTUPDIR/kasmrx ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE # Install Firefox COPY ./src/ubuntu/install/firefox/ $INST_SCRIPTS/firefox/ diff --git a/dockerfile-kasm-gimp b/dockerfile-kasm-gimp index affde2b..0ae0c98 100644 --- a/dockerfile-kasm-gimp +++ b/dockerfile-kasm-gimp @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-hunchly b/dockerfile-kasm-hunchly index c8411e0..4848164 100644 --- a/dockerfile-kasm-hunchly +++ b/dockerfile-kasm-hunchly @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/ -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-insomnia b/dockerfile-kasm-insomnia index d422e25..744b858 100644 --- a/dockerfile-kasm-insomnia +++ b/dockerfile-kasm-insomnia @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-java-dev b/dockerfile-kasm-java-dev index ed4bc59..3aad8e3 100644 --- a/dockerfile-kasm-java-dev +++ b/dockerfile-kasm-java-dev @@ -12,7 +12,6 @@ WORKDIR $HOME ENV DEBIAN_FRONTEND noninteractive ENV KASM_RX_HOME $STARTUPDIR/kasmrx ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE ### Install Tools diff --git a/dockerfile-kasm-maltego b/dockerfile-kasm-maltego index b6cc10a..a4dfc6d 100644 --- a/dockerfile-kasm-maltego +++ b/dockerfile-kasm-maltego @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-only-office b/dockerfile-kasm-only-office index 0693e7f..b7e655d 100644 --- a/dockerfile-kasm-only-office +++ b/dockerfile-kasm-only-office @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-postman b/dockerfile-kasm-postman index 8cd0ac6..04acf27 100644 --- a/dockerfile-kasm-postman +++ b/dockerfile-kasm-postman @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-rdesktop b/dockerfile-kasm-rdesktop index d3bd12d..82e9e85 100644 --- a/dockerfile-kasm-rdesktop +++ b/dockerfile-kasm-rdesktop @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-remmina b/dockerfile-kasm-remmina index f779e28..a36dc24 100644 --- a/dockerfile-kasm-remmina +++ b/dockerfile-kasm-remmina @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-signal b/dockerfile-kasm-signal index dff5406..03a82bb 100644 --- a/dockerfile-kasm-signal +++ b/dockerfile-kasm-signal @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-slack b/dockerfile-kasm-slack index 8465829..20e8fbc 100644 --- a/dockerfile-kasm-slack +++ b/dockerfile-kasm-slack @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-steam b/dockerfile-kasm-steam index 4ee0970..612e525 100644 --- a/dockerfile-kasm-steam +++ b/dockerfile-kasm-steam @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-sublime-text b/dockerfile-kasm-sublime-text index 881389e..f735299 100644 --- a/dockerfile-kasm-sublime-text +++ b/dockerfile-kasm-sublime-text @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-teams b/dockerfile-kasm-teams index cb54d16..59af37c 100644 --- a/dockerfile-kasm-teams +++ b/dockerfile-kasm-teams @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-telegram b/dockerfile-kasm-telegram index f3d4cbb..b40f1ca 100644 --- a/dockerfile-kasm-telegram +++ b/dockerfile-kasm-telegram @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-terminal b/dockerfile-kasm-terminal index 6122494..0bbaa26 100644 --- a/dockerfile-kasm-terminal +++ b/dockerfile-kasm-terminal @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-tor-browser b/dockerfile-kasm-tor-browser index 9c5c80e..a19b212 100644 --- a/dockerfile-kasm-tor-browser +++ b/dockerfile-kasm-tor-browser @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE # TODO: Once we satisfy KASM-1423, move these to the core images instead ENV PULSE_RUNTIME_PATH "/tmp/pulse" ENV PULSE_STATE_PATH "/tmp/pulse" diff --git a/dockerfile-kasm-ubuntu-focal-desktop b/dockerfile-kasm-ubuntu-focal-desktop index 2d239ac..3cfa1ff 100644 --- a/dockerfile-kasm-ubuntu-focal-desktop +++ b/dockerfile-kasm-ubuntu-focal-desktop @@ -12,7 +12,6 @@ WORKDIR $HOME ENV DEBIAN_FRONTEND noninteractive ENV KASM_RX_HOME $STARTUPDIR/kasmrx ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE ### Install Tools diff --git a/dockerfile-kasm-ubuntu-focal-dind b/dockerfile-kasm-ubuntu-focal-dind index d95c697..b1cbd8e 100644 --- a/dockerfile-kasm-ubuntu-focal-dind +++ b/dockerfile-kasm-ubuntu-focal-dind @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-ubuntu-focal-dind-rootless b/dockerfile-kasm-ubuntu-focal-dind-rootless index 547b1cb..d2f6c21 100644 --- a/dockerfile-kasm-ubuntu-focal-dind-rootless +++ b/dockerfile-kasm-ubuntu-focal-dind-rootless @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-vlc b/dockerfile-kasm-vlc index f2e20ae..d65a563 100644 --- a/dockerfile-kasm-vlc +++ b/dockerfile-kasm-vlc @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-vmware-horizon b/dockerfile-kasm-vmware-horizon index e5edc5a..71c81e7 100644 --- a/dockerfile-kasm-vmware-horizon +++ b/dockerfile-kasm-vmware-horizon @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-vs-code b/dockerfile-kasm-vs-code index c6a3df2..58fb3ab 100644 --- a/dockerfile-kasm-vs-code +++ b/dockerfile-kasm-vs-code @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-zoom b/dockerfile-kasm-zoom index 9ca3f5f..fdb7cdb 100644 --- a/dockerfile-kasm-zoom +++ b/dockerfile-kasm-zoom @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### diff --git a/dockerfile-kasm-zsnes b/dockerfile-kasm-zsnes index e744c5e..9444eb3 100644 --- a/dockerfile-kasm-zsnes +++ b/dockerfile-kasm-zsnes @@ -6,7 +6,6 @@ USER root ENV HOME /home/kasm-default-profile ENV STARTUPDIR /dockerstartup ENV INST_SCRIPTS $STARTUPDIR/install -ENV BASE_IMAGE $BASE_IMAGE WORKDIR $HOME ######### Customize Container Here ########### From 64d67d163d97eb806b5b9d07c24c4e9a5d1f2dba Mon Sep 17 00:00:00 2001 From: Richard Koliser Date: Wed, 23 Mar 2022 17:19:57 -0400 Subject: [PATCH 4/6] KASM-2193 Updated vncviewer image to focal This image got missed when I merged develop into my branch before submitting the merge request. --- dockerfile-kasm-realvnc-vncviewer | 3 ++- src/ubuntu/install/realvnc_vncviewer/custom_startup.sh | 9 ++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dockerfile-kasm-realvnc-vncviewer b/dockerfile-kasm-realvnc-vncviewer index 94ae657..6a32009 100644 --- a/dockerfile-kasm-realvnc-vncviewer +++ b/dockerfile-kasm-realvnc-vncviewer @@ -1,5 +1,6 @@ ARG BASE_TAG="develop" -FROM kasmweb/core-ubuntu-bionic:$BASE_TAG +ARG BASE_IMAGE="core-ubuntu-focal" +FROM kasmweb/$BASE_IMAGE:$BASE_TAG USER root ENV HOME /home/kasm-default-profile diff --git a/src/ubuntu/install/realvnc_vncviewer/custom_startup.sh b/src/ubuntu/install/realvnc_vncviewer/custom_startup.sh index c88bba1..6e75912 100644 --- a/src/ubuntu/install/realvnc_vncviewer/custom_startup.sh +++ b/src/ubuntu/install/realvnc_vncviewer/custom_startup.sh @@ -2,7 +2,8 @@ set -ex START_COMMAND="/usr/bin/vncviewer" PGREP="vncviewer" -MAXIMUS="false" +export MAXIMIZE="false" +MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh DEFAULT_ARGS="" ARGS=${APP_ARGS:-$DEFAULT_ARGS} @@ -38,6 +39,7 @@ kasm_exec() { if [ -n "$URL" ] ; then /usr/bin/filter_ready /usr/bin/desktop_ready + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $OPT_URL else echo "No URL specified for exec command. Doing nothing." @@ -53,10 +55,6 @@ kasm_startup() { if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then - if [[ $MAXIMUS == 'true' ]] ; then - maximus & - fi - while true do if ! pgrep -x $PGREP > /dev/null @@ -64,6 +62,7 @@ kasm_startup() { /usr/bin/filter_ready /usr/bin/desktop_ready set +e + bash ${MAXIMIZE_SCRIPT} & $START_COMMAND $ARGS $URL set -e fi From 4a901802a57fb5411bb49232d808dc6a2b0660f9 Mon Sep 17 00:00:00 2001 From: Richard Koliser Date: Wed, 23 Mar 2022 17:21:28 -0400 Subject: [PATCH 5/6] KASM-2193 Update the readme ci for the images with bionic The old images that had bionic in their name, forgot to update them to focal in the ci for generating readmes --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aedf121..7c41885 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -397,4 +397,4 @@ update_readmes: - $README_PASSWORD parallel: matrix: - - KASM_IMAGE: [chrome, chromium, firefox, desktop, desktop-deluxe, firefox-mobile, tor-browser, doom, edge, terminal, vmware-horizon, remmina, rdesktop, brave, discord, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, ubuntu-bionic-desktop, maltego, centos-7-desktop, telegram, hunchly, ubuntu-bionic-dind, ubuntu-bionic-dind-rootless, tracelabs, java-dev ] \ No newline at end of file + - KASM_IMAGE: [chrome, chromium, firefox, desktop, desktop-deluxe, firefox-mobile, tor-browser, doom, edge, terminal, vmware-horizon, remmina, rdesktop, brave, discord, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, ubuntu-focal-desktop, maltego, centos-7-desktop, telegram, hunchly, ubuntu-focal-dind, ubuntu-focal-dind-rootless, tracelabs, java-dev ] \ No newline at end of file From 94518cee65222210858763eb25881ebbbba1eb5d Mon Sep 17 00:00:00 2001 From: Richard Koliser Date: Thu, 24 Mar 2022 10:34:57 -0400 Subject: [PATCH 6/6] KASM-2193 Add --no-sandbox to zoom to allow app startup --- src/ubuntu/install/zoom/custom_startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ubuntu/install/zoom/custom_startup.sh b/src/ubuntu/install/zoom/custom_startup.sh index 4d5a987..e9f261e 100644 --- a/src/ubuntu/install/zoom/custom_startup.sh +++ b/src/ubuntu/install/zoom/custom_startup.sh @@ -5,7 +5,7 @@ PGREP="zoom" export MAXIMIZE="true" export MAXIMIZE_NAME="Zoom" MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh -DEFAULT_ARGS="" +DEFAULT_ARGS="--no-sandbox" ARGS=${APP_ARGS:-$DEFAULT_ARGS} options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit