mirror of
https://github.com/kasmtech/workspaces-images.git
synced 2024-11-24 17:13:10 +01:00
Resolve KASM-2574 "Feature/ add thunderbird"
This commit is contained in:
parent
3820fa7853
commit
81e34e3252
@ -4,7 +4,7 @@ services:
|
||||
variables:
|
||||
DOCKER_AUTH_CONFIG: ${_DOCKER_AUTH_CONFIG}
|
||||
PLATFORM: "linux/amd64"
|
||||
ARM_BUILDS: ",chromium,firefox,gimp,rdesktop,remmina,terminal,ubuntu-bionic-desktop,ubuntu-focal-desktop,vlc,vs-code,doom,sublime-text,tor-browser,java-dev,telegram,opensuse-15-desktop,oracle-8-desktop,libre-office,"
|
||||
ARM_BUILDS: ",chromium,firefox,gimp,rdesktop,remmina,terminal,ubuntu-bionic-desktop,ubuntu-focal-desktop,vlc,vs-code,doom,sublime-text,tor-browser,java-dev,telegram,opensuse-15-desktop,oracle-8-desktop,libre-office,thunderbird,"
|
||||
CORE_IMAGE_TAG: "develop"
|
||||
CORE_IMAGE: "core-ubuntu-focal"
|
||||
USE_PRIVATE_IMAGES: 0
|
||||
@ -75,7 +75,7 @@ build_app_images:
|
||||
- aws-autoscale
|
||||
parallel:
|
||||
matrix:
|
||||
- KASM_IMAGE: [doom, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, vmware-horizon, remmina, rdesktop, discord, libre-office]
|
||||
- KASM_IMAGE: [doom, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, vmware-horizon, remmina, rdesktop, discord, libre-office, thunderbird]
|
||||
|
||||
build_ubuntu_desktop_images:
|
||||
stage: build
|
||||
@ -201,7 +201,7 @@ build_dev_app_images:
|
||||
- aws-autoscale
|
||||
parallel:
|
||||
matrix:
|
||||
- KASM_IMAGE: [doom, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, vmware-horizon, remmina, rdesktop, discord, libre-office]
|
||||
- KASM_IMAGE: [doom, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, vmware-horizon, remmina, rdesktop, discord, libre-office, thunderbird]
|
||||
|
||||
build_dev_ubuntu_desktop_images:
|
||||
stage: build
|
||||
@ -324,7 +324,7 @@ build_schedules_app_images:
|
||||
- aws-autoscale
|
||||
parallel:
|
||||
matrix:
|
||||
- KASM_IMAGE: [doom, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, vmware-horizon, remmina, rdesktop, discord, libre-office]
|
||||
- KASM_IMAGE: [doom, sublime-text, gimp, vs-code, slack, teams, only-office, zoom, signal, steam, postman, insomnia, zsnes, vlc, maltego, telegram, hunchly, java-dev, terminal, vmware-horizon, remmina, rdesktop, discord, libre-office, thunderbird]
|
||||
CORE_IMAGE: [core-ubuntu-bionic, core-ubuntu-focal]
|
||||
|
||||
build_schedules_ubuntu_desktop_images:
|
||||
@ -406,4 +406,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-focal-desktop, maltego, centos-7-desktop, telegram, hunchly, ubuntu-focal-dind, ubuntu-focal-dind-rootless, tracelabs, java-dev, oracle-7-desktop, oracle-8-desktop, opensuse-15-desktop, libre-office ]
|
||||
- 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, oracle-7-desktop, oracle-8-desktop, opensuse-15-desktop, libre-office, thunderbird ]
|
||||
|
@ -25,6 +25,9 @@ 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 Thunderbird
|
||||
COPY ./src/ubuntu/install/thunderbird $INST_SCRIPTS/thunderbird/
|
||||
RUN bash $INST_SCRIPTS/thunderbird/install_thunderbird.sh && rm -rf $INST_SCRIPTS/thunderbird/
|
||||
|
||||
######### End Customizations ###########
|
||||
|
||||
|
@ -80,6 +80,10 @@ RUN bash $INST_SCRIPTS/terraform/install_terraform.sh && rm -rf $INST_SCRIPTS/t
|
||||
COPY ./src/opensuse/install/telegram $INST_SCRIPTS/telegram/
|
||||
RUN bash $INST_SCRIPTS/telegram/install_telegram.sh && rm -rf $INST_SCRIPTS/telegram/
|
||||
|
||||
### Install Thunderbird
|
||||
COPY ./src/ubuntu/install/thunderbird $INST_SCRIPTS/thunderbird/
|
||||
RUN bash $INST_SCRIPTS/thunderbird/install_thunderbird.sh && rm -rf $INST_SCRIPTS/thunderbird/
|
||||
|
||||
#ADD ./src/common/scripts $STARTUPDIR
|
||||
RUN $STARTUPDIR/set_user_permission.sh $HOME
|
||||
|
||||
|
@ -76,6 +76,10 @@ RUN bash $INST_SCRIPTS/terraform/install_terraform.sh && rm -rf $INST_SCRIPTS/t
|
||||
COPY ./src/oracle/install/telegram $INST_SCRIPTS/telegram/
|
||||
RUN bash $INST_SCRIPTS/telegram/install_telegram.sh && rm -rf $INST_SCRIPTS/telegram/
|
||||
|
||||
### Install Thunderbird
|
||||
COPY ./src/ubuntu/install/thunderbird $INST_SCRIPTS/thunderbird/
|
||||
RUN bash $INST_SCRIPTS/thunderbird/install_thunderbird.sh && rm -rf $INST_SCRIPTS/thunderbird/
|
||||
|
||||
#ADD ./src/common/scripts $STARTUPDIR
|
||||
RUN $STARTUPDIR/set_user_permission.sh $HOME
|
||||
|
||||
|
@ -88,6 +88,10 @@ RUN bash $INST_SCRIPTS/terraform/install_terraform.sh && rm -rf $INST_SCRIPTS/t
|
||||
COPY ./src/oracle/install/telegram $INST_SCRIPTS/telegram/
|
||||
RUN bash $INST_SCRIPTS/telegram/install_telegram.sh && rm -rf $INST_SCRIPTS/telegram/
|
||||
|
||||
### Install Thunderbird
|
||||
COPY ./src/ubuntu/install/thunderbird $INST_SCRIPTS/thunderbird/
|
||||
RUN bash $INST_SCRIPTS/thunderbird/install_thunderbird.sh && rm -rf $INST_SCRIPTS/thunderbird/
|
||||
|
||||
#ADD ./src/common/scripts $STARTUPDIR
|
||||
RUN $STARTUPDIR/set_user_permission.sh $HOME
|
||||
|
||||
|
35
dockerfile-kasm-thunderbird
Normal file
35
dockerfile-kasm-thunderbird
Normal file
@ -0,0 +1,35 @@
|
||||
ARG BASE_TAG="develop"
|
||||
ARG BASE_IMAGE="core-ubuntu-focal"
|
||||
FROM kasmweb/$BASE_IMAGE:$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/thunderbird $INST_SCRIPTS/thunderbird/
|
||||
RUN bash $INST_SCRIPTS/thunderbird/install_thunderbird.sh && rm -rf $INST_SCRIPTS/thunderbird/
|
||||
|
||||
COPY ./src/ubuntu/install/thunderbird/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
|
@ -91,6 +91,10 @@ 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/
|
||||
|
||||
### Install Thunderbird
|
||||
COPY ./src/ubuntu/install/thunderbird $INST_SCRIPTS/thunderbird/
|
||||
RUN bash $INST_SCRIPTS/thunderbird/install_thunderbird.sh && rm -rf $INST_SCRIPTS/thunderbird/
|
||||
|
||||
#ADD ./src/common/scripts $STARTUPDIR
|
||||
RUN $STARTUPDIR/set_user_permission.sh $HOME
|
||||
|
||||
|
7
docs/thunderbird/README.md
Normal file
7
docs/thunderbird/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# About This Image
|
||||
|
||||
This Image contains a browser-accessible version of [Thunderbird](https://www.thunderbird.net/).
|
||||
|
||||
![Screenshot][Image_Screenshot]
|
||||
|
||||
[Image_Screenshot]: https://5856039.fs1.hubspotusercontent-na1.net/hubfs/5856039/dockerhub/image-screenshots/thunderbird.png "Image Screenshot"
|
1
docs/thunderbird/description.txt
Normal file
1
docs/thunderbird/description.txt
Normal file
@ -0,0 +1 @@
|
||||
Thunderbird for Kasm Workspaces
|
@ -8,8 +8,10 @@ fi
|
||||
|
||||
|
||||
wget -q https://zoom.us/client/latest/zoom_openSUSE_$(arch).rpm
|
||||
rpm --import https://zoom.us/linux/download/pubkey
|
||||
zypper install -yn zoom_openSUSE_$(arch).rpm
|
||||
wget -O /tmp/package-signing-key.pub https://zoom.us/linux/download/pubkey
|
||||
rpm --import /tmp/package-signing-key.pub
|
||||
rm -f /tmp/package-signing-key.pub
|
||||
zypper install -yn --allow-unsigned-rpm zoom_openSUSE_$(arch).rpm
|
||||
zypper clean --all
|
||||
rm zoom_openSUSE_$(arch).rpm
|
||||
sed -i 's,/usr/bin/zoom,/usr/bin/zoom --no-sandbox,g' /usr/share/applications/Zoom.desktop
|
||||
|
81
src/ubuntu/install/thunderbird/custom_startup.sh
Normal file
81
src/ubuntu/install/thunderbird/custom_startup.sh
Normal file
@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
START_COMMAND="thunderbird"
|
||||
PGREP="thunderbird"
|
||||
export MAXIMIZE="true"
|
||||
export MAXIMIZE_NAME="Mozilla"
|
||||
MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh
|
||||
DEFAULT_ARGS=""
|
||||
ARGS=${APP_ARGS:-$DEFAULT_ARGS}
|
||||
|
||||
options=$(getopt -o gau: -l go,assign,url: -n "$0" -- "$@") || exit
|
||||
eval set -- "$options"
|
||||
|
||||
while [[ $1 != -- ]]; do
|
||||
case $1 in
|
||||
-g|--go) GO='true'; shift 1;;
|
||||
-a|--assign) ASSIGN='true'; shift 1;;
|
||||
-u|--url) OPT_URL=$2; shift 2;;
|
||||
*) echo "bad option: $1" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
shift
|
||||
|
||||
# Process non-option arguments.
|
||||
for arg; do
|
||||
echo "arg! $arg"
|
||||
done
|
||||
|
||||
FORCE=$2
|
||||
|
||||
kasm_exec() {
|
||||
if [ -n "$OPT_URL" ] ; then
|
||||
URL=$OPT_URL
|
||||
elif [ -n "$1" ] ; then
|
||||
URL=$1
|
||||
fi
|
||||
|
||||
# Since we are execing into a container that already has the browser running from startup,
|
||||
# when we don't have a URL to open we want to do nothing. Otherwise a second browser instance would open.
|
||||
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."
|
||||
fi
|
||||
}
|
||||
|
||||
kasm_startup() {
|
||||
if [ -n "$KASM_URL" ] ; then
|
||||
URL=$KASM_URL
|
||||
elif [ -z "$URL" ] ; then
|
||||
URL=$LAUNCH_URL
|
||||
fi
|
||||
|
||||
if [ -z "$DISABLE_CUSTOM_STARTUP" ] || [ -n "$FORCE" ] ; then
|
||||
|
||||
while true
|
||||
do
|
||||
if ! pgrep -x $PGREP > /dev/null
|
||||
then
|
||||
/usr/bin/filter_ready
|
||||
/usr/bin/desktop_ready
|
||||
set +e
|
||||
bash ${MAXIMIZE_SCRIPT} &
|
||||
$START_COMMAND $ARGS $URL
|
||||
set -e
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
if [ -n "$GO" ] || [ -n "$ASSIGN" ] ; then
|
||||
kasm_exec
|
||||
else
|
||||
kasm_startup
|
||||
fi
|
26
src/ubuntu/install/thunderbird/install_thunderbird.sh
Normal file
26
src/ubuntu/install/thunderbird/install_thunderbird.sh
Normal file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
# Install
|
||||
if [[ "${DISTRO}" == @(centos|oracle7|oracle8) ]]; then
|
||||
if [ "${DISTRO}" == "oracle8" ]; then
|
||||
dnf install -y thunderbird
|
||||
dnf clean all
|
||||
else
|
||||
yum install -y thunderbird
|
||||
yum clean all
|
||||
fi
|
||||
elif [ "${DISTRO}" == "opensuse" ]; then
|
||||
zypper install -yn MozillaThunderbird
|
||||
zypper clean --all
|
||||
else
|
||||
apt-get update
|
||||
apt-get install -y thunderbird
|
||||
rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/*
|
||||
fi
|
||||
|
||||
# Desktop icon
|
||||
cp /usr/share/applications/thunderbird.desktop $HOME/Desktop/
|
||||
chmod +x $HOME/Desktop/thunderbird.desktop
|
Loading…
Reference in New Issue
Block a user