mirror of
https://github.com/kasmtech/workspaces-images.git
synced 2024-11-21 15:43:09 +01:00
Resolve KASM-1760 "Feature/ telegram"
This commit is contained in:
parent
315d9a69eb
commit
0b126853c3
@ -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 ]
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
35
dockerfile-kasm-telegram
Normal 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
|
@ -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
11
docs/telegram/README.md
Normal 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.
|
1
docs/telegram/description.txt
Normal file
1
docs/telegram/description.txt
Normal file
@ -0,0 +1 @@
|
||||
Telegram Desktop for Kasm Workspaces
|
29
src/ubuntu/install/telegram/custom_startup.sh
Normal file
29
src/ubuntu/install/telegram/custom_startup.sh
Normal 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
|
27
src/ubuntu/install/telegram/install_telegram.sh
Normal file
27
src/ubuntu/install/telegram/install_telegram.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user