Merge branch 'feature/KASM-1760_telegram' into 'develop'

This commit is contained in:
Justin Travis 2021-09-14 19:13:43 +00:00
commit 6805725b27
9 changed files with 116 additions and 5 deletions

View File

@ -34,7 +34,7 @@ build:
parallel:
matrix:
- KASM_IMAGE: [chrome, 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 ]
- KASM_IMAGE: [chrome, 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 ]
@ -56,7 +56,7 @@ build_dev:
- /^release\/.*$/
parallel:
matrix:
- KASM_IMAGE: [chrome, 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 ]
- KASM_IMAGE: [chrome, 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 ]
@ -76,7 +76,7 @@ build_schedules:
- schedules
parallel:
matrix:
- KASM_IMAGE: [chrome, 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 ]
- KASM_IMAGE: [chrome, 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 ]
@ -96,5 +96,5 @@ update_readmes:
- $README_PASSWORD
parallel:
matrix:
- KASM_IMAGE: [chrome, 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 ]
- KASM_IMAGE: [chrome, 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 ]

View File

@ -1,5 +1,5 @@
ARG BASE_TAG="develop"
FROM kasmweb/core-centos-7-private:$BASE_TAG
FROM kasmweb/core-centos-7:$BASE_TAG
USER root
ENV DISTRO=centos

View File

@ -90,6 +90,10 @@ RUN bash $INST_SCRIPTS/ansible/install_ansible.sh && rm -rf $INST_SCRIPTS/ansib
COPY ./src/ubuntu/install/terraform $INST_SCRIPTS/terraform/
RUN bash $INST_SCRIPTS/terraform/install_terraform.sh && rm -rf $INST_SCRIPTS/terraform/
### Install Telegram
COPY ./src/ubuntu/install/telegram $INST_SCRIPTS/telegram/
RUN bash $INST_SCRIPTS/telegram/install_telegram.sh && rm -rf $INST_SCRIPTS/telegram/
### Remove maxmius
RUN apt-get remove -y maximus

35
dockerfile-kasm-telegram Normal file
View File

@ -0,0 +1,35 @@
ARG BASE_TAG="develop"
FROM kasmweb/core-ubuntu-bionic:$BASE_TAG
USER root
ENV HOME /home/kasm-default-profile
ENV STARTUPDIR /dockerstartup
ENV INST_SCRIPTS $STARTUPDIR/install
WORKDIR $HOME
######### Customize Container Here ###########
COPY ./src/ubuntu/install/telegram $INST_SCRIPTS/telegram/
RUN bash $INST_SCRIPTS/telegram/install_telegram.sh && rm -rf $INST_SCRIPTS/telegram/
COPY ./src/ubuntu/install/telegram/custom_startup.sh $STARTUPDIR/custom_startup.sh
RUN chmod +x $STARTUPDIR/custom_startup.sh
RUN chmod 755 $STARTUPDIR/custom_startup.sh
# Update the desktop environment to be optimized for a single application
RUN cp $HOME/.config/xfce4/xfconf/single-application-xfce-perchannel-xml/* $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/
RUN cp /usr/share/extra/backgrounds/bg_kasm.png /usr/share/extra/backgrounds/bg_default.png
RUN apt-get remove -y xfce4-panel
######### End Customizations ###########
RUN chown 1000:0 $HOME
ENV HOME /home/kasm-user
WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME
USER 1000

View File

@ -86,6 +86,10 @@ RUN bash $INST_SCRIPTS/ansible/install_ansible.sh && rm -rf $INST_SCRIPTS/ansib
COPY ./src/ubuntu/install/terraform $INST_SCRIPTS/terraform/
RUN bash $INST_SCRIPTS/terraform/install_terraform.sh && rm -rf $INST_SCRIPTS/terraform/
### Install Telegram
COPY ./src/ubuntu/install/telegram $INST_SCRIPTS/telegram/
RUN bash $INST_SCRIPTS/telegram/install_telegram.sh && rm -rf $INST_SCRIPTS/telegram/
### Remove maxmius
RUN apt-get remove -y maximus

11
docs/telegram/README.md Normal file
View File

@ -0,0 +1,11 @@
# About This Image
This Image contains a browser-accessible version of [Telegram Desktop](https://telegram.org/).
![Screenshot][Image_Screenshot]
[Image_Screenshot]: https://f.hubspotusercontent30.net/hubfs/5856039/dockerhub/image-screenshots/telegram.png "Image Screenshot"
# Environment Variables
* `APP_ARGS` - Additional arguments to pass to the application when launched.

View File

@ -0,0 +1 @@
Telegram Desktop for Kasm Workspaces

View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -ex
FORCE=$1
DEFAULT_ARGS=""
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
if ( [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ) ; then
if [ -f /tmp/custom_startup.lck ] ; then
echo "custom_startup already running!"
exit 1
fi
touch /tmp/custom_startup.lck
while true
do
if ! pgrep -x Telegram > /dev/null
then
/usr/bin/desktop_ready
/usr/bin/filter_ready
set +e
/opt/Telegram/Telegram $ARGS &
set -e
fi
sleep 1
done
rm /tmp/custom_startup.lck
fi

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -ex
wget -q https://telegram.org/dl/desktop/linux -O /tmp/telegram.tgz
tar -xvf /tmp/telegram.tgz -C /opt/
rm -rf /tmp/telegram.tgz
wget -q https://kasm-static-content.s3.amazonaws.com/icons/telegram.png -O /opt/Telegram/telegram_icon.png
cat >/usr/share/applications/telegram.desktop <<EOL
[Desktop Entry]
Version=1.0
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=/opt/Telegram/Telegram
Exec=/opt/Telegram/Telegram -- %u
Icon=/opt/Telegram/telegram_icon.png
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
Categories=Chat;Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg;
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
X-GNOME-UsesNotifications=true
EOL
chmod +x /usr/share/applications/telegram.desktop
cp /usr/share/applications/telegram.desktop $HOME/Desktop/telegram.desktop
chown 1000:1000 $HOME/Desktop/telegram.desktop