From 64f9919e99b34065f528ec7d9b62e7b3c8acfbcc Mon Sep 17 00:00:00 2001 From: Matthew McClaskey Date: Tue, 18 Jan 2022 18:13:29 +0000 Subject: [PATCH] Resolve KASM-2227 "Feature/ java dev" --- .gitlab-ci.yml | 8 +-- dockerfile-kasm-java-dev | 70 +++++++++++++++++++ docs/java-dev/README.md | 7 ++ docs/java-dev/description.txt | 1 + src/ubuntu/install/eclipse/eclipse.desktop | 12 ++++ src/ubuntu/install/eclipse/install_eclipse.sh | 12 ++++ 6 files changed, 106 insertions(+), 4 deletions(-) create mode 100644 dockerfile-kasm-java-dev create mode 100644 docs/java-dev/README.md create mode 100644 docs/java-dev/description.txt create mode 100755 src/ubuntu/install/eclipse/eclipse.desktop create mode 100644 src/ubuntu/install/eclipse/install_eclipse.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 18e3d81..f019c8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,7 +42,7 @@ build: - aws-autoscale 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 ] + - 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 ] @@ -73,7 +73,7 @@ build_dev: - aws-autoscale 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 ] + - 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 ] @@ -101,7 +101,7 @@ build_schedules: - aws-autoscale 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 ] + - 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 ] @@ -121,4 +121,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 ] + - 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 ] diff --git a/dockerfile-kasm-java-dev b/dockerfile-kasm-java-dev new file mode 100644 index 0000000..6cb9e9b --- /dev/null +++ b/dockerfile-kasm-java-dev @@ -0,0 +1,70 @@ +ARG BASE_TAG="develop" +FROM kasmweb/core-ubuntu-bionic:$BASE_TAG + +USER root + +ENV HOME /home/kasm-default-profile +ENV STARTUPDIR /dockerstartup +WORKDIR $HOME + +### Envrionment config +ENV DEBIAN_FRONTEND noninteractive +ENV KASM_RX_HOME $STARTUPDIR/kasmrx +ENV INST_SCRIPTS $STARTUPDIR/install + + +### Install Tools +COPY ./src/ubuntu/install/tools $INST_SCRIPTS/tools/ +RUN bash $INST_SCRIPTS/tools/install_tools_deluxe.sh && rm -rf $INST_SCRIPTS/tools/ + +# Install Utilities +COPY ./src/ubuntu/install/misc $INST_SCRIPTS/misc/ +RUN bash $INST_SCRIPTS/misc/install_tools.sh && rm -rf $INST_SCRIPTS/misc/ + +# Install Google Chrome +COPY ./src/ubuntu/install/chrome $INST_SCRIPTS/chrome/ +RUN bash $INST_SCRIPTS/chrome/install_chrome.sh && rm -rf $INST_SCRIPTS/chrome/ + +# Install Firefox +COPY ./src/ubuntu/install/firefox/ $INST_SCRIPTS/firefox/ +COPY ./src/ubuntu/install/firefox/firefox.desktop $HOME/Desktop/ +RUN bash $INST_SCRIPTS/firefox/install_firefox.sh && rm -rf $INST_SCRIPTS/firefox/ + +### Install Sublime Text +COPY ./src/ubuntu/install/sublime_text $INST_SCRIPTS/sublime_text/ +RUN bash $INST_SCRIPTS/sublime_text/install_sublime_text.sh && rm -rf $INST_SCRIPTS/sublime_text/ + +### Install Visual Studio Code +COPY ./src/ubuntu/install/vs_code $INST_SCRIPTS/vs_code/ +RUN bash $INST_SCRIPTS/vs_code/install_vs_code.sh && rm -rf $INST_SCRIPTS/vs_code/ + +### Install Remmina +COPY ./src/ubuntu/install/remmina $INST_SCRIPTS/remmina/ +RUN bash $INST_SCRIPTS/remmina/install_remmina.sh && rm -rf $INST_SCRIPTS/remmina/ + +### Install Only Office +COPY ./src/ubuntu/install/only_office $INST_SCRIPTS/only_office/ +RUN bash $INST_SCRIPTS/only_office/install_only_office.sh && rm -rf $INST_SCRIPTS/only_office/ + +### Install Java +RUN apt-get update && apt-get install -y default-jdk default-jre + +### Install Eclipse +COPY ./src/ubuntu/install/eclipse $INST_SCRIPTS/eclipse +RUN bash $INST_SCRIPTS/eclipse/install_eclipse.sh && rm -rf $INST_SCRIPTS/eclipse/ + +### Remove maxmius +RUN apt-get remove -y maximus + +#ADD ./src/common/scripts $STARTUPDIR +RUN $STARTUPDIR/set_user_permission.sh $HOME + +RUN chown 1000:0 $HOME + +ENV HOME /home/kasm-user +WORKDIR $HOME +RUN mkdir -p $HOME && chown -R 1000:0 $HOME + +USER 1000 + +CMD ["--tail-log"] diff --git a/docs/java-dev/README.md b/docs/java-dev/README.md new file mode 100644 index 0000000..be61ba0 --- /dev/null +++ b/docs/java-dev/README.md @@ -0,0 +1,7 @@ +# About This Image + +This Image contains a browser-accessible Ubuntu Bionic Desktop with a Java development environment. + +![Screenshot][Image_Screenshot] + +[Image_Screenshot]: https://f.hubspotusercontent30.net/hubfs/5856039/dockerhub/image-screenshots/java-dev-desktop.jpg "Image Screenshot" diff --git a/docs/java-dev/description.txt b/docs/java-dev/description.txt new file mode 100644 index 0000000..fa8400b --- /dev/null +++ b/docs/java-dev/description.txt @@ -0,0 +1 @@ +Ubuntu Java development desktop for Kasm Workspaces diff --git a/src/ubuntu/install/eclipse/eclipse.desktop b/src/ubuntu/install/eclipse/eclipse.desktop new file mode 100755 index 0000000..22a5133 --- /dev/null +++ b/src/ubuntu/install/eclipse/eclipse.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Eclipse IDE +GenericName=IDE +Comment=Sophisticated text editor for code, markup and prose +Exec=/opt/eclipse/eclipse +Terminal=false +MimeType=text/plain; +Icon=eclipse128.png +Categories=Development;IDE; +StartupNotify=true diff --git a/src/ubuntu/install/eclipse/install_eclipse.sh b/src/ubuntu/install/eclipse/install_eclipse.sh new file mode 100644 index 0000000..0b69e03 --- /dev/null +++ b/src/ubuntu/install/eclipse/install_eclipse.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +ECLIPSE_VER_DATE="2021-12" + +cd /tmp +wget -q -O eclipse.tar.gz "https://mirrors.xmission.com/eclipse/technology/epp/downloads/release/${ECLIPSE_VER_DATE}/R/eclipse-java-${ECLIPSE_VER_DATE}-R-linux-gtk-x86_64.tar.gz" +tar -xzf eclipse.tar.gz -C /opt + +ECLIPSE_ICON="/opt/eclipse/plugins/$(ls /opt/eclipse/plugins/ | grep -m 1 org.eclipse.platform_)/eclipse128.png" +sed -i "s#eclipse128.png#${ECLIPSE_ICON}#" $INST_SCRIPTS/eclipse/eclipse.desktop +cp $INST_SCRIPTS/eclipse/eclipse.desktop $HOME/Desktop/ +cp $INST_SCRIPTS/eclipse/eclipse.desktop /usr/share/applications/