glasstop/Dockerfile

143 lines
5 KiB
Text
Raw Permalink Normal View History

2024-10-24 21:56:06 +03:00
ARG BASE_TAG="develop"
ARG BASE_IMAGE="core-debian-bookworm"
FROM kasmweb/$BASE_IMAGE:$BASE_TAG
USER root
ENV HOME /home/kasm-default-profile
ENV STARTUPDIR /dockerstartup
WORKDIR $HOME
### Envrionment config
ENV DEBIAN_FRONTEND=noninteractive \
SKIP_CLEAN=true \
KASM_RX_HOME=$STARTUPDIR/kasmrx \
DONT_PROMPT_WSL_INSTALL="No_Prompt_please" \
INST_DIR=$STARTUPDIR/install
2024-10-25 02:42:48 +03:00
# Setup repos
RUN \
wget https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg -O /usr/share/keyrings/vscodium-archive-keyring.asc \
&& echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.asc ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main' | tee /etc/apt/sources.list.d/vscodium.list \
&& apt-get update \
&& apt-get upgrade -y
# Fonts whee
RUN apt-get install -y fonts-recommended fonts-symbola fonts-glasstty fonts-firacode
# Essential stuff
RUN apt-get install -y \
2024-10-25 05:06:43 +03:00
xdotool nano zip wget curl htop iotop bash-completion \
2024-10-25 02:42:48 +03:00
vlc \
git \
build-essential \
2024-10-25 05:06:43 +03:00
python-is-python3 \
xarchiver \
thunar-archive-plugin
2024-10-25 02:42:48 +03:00
# Java
RUN apt-get install -y default-jre
# Firefox
2024-10-25 05:06:43 +03:00
RUN apt-get install -y firefox-esr firefox-esr-l10n-fi && cp /usr/share/applications/firefox-esr.desktop $HOME/Desktop
2024-10-25 02:42:48 +03:00
COPY firefox-policies.json /etc/firefox/policies/policies.json
# Thunderbird
2024-10-25 05:06:43 +03:00
RUN apt-get install -y thunderbird thunderbird-l10n-fi && cp /usr/share/applications/thunderbird.desktop $HOME/Desktop
2024-10-25 02:42:48 +03:00
# Libreoffice
2024-10-25 05:06:43 +03:00
RUN apt-get install -y libreoffice libreoffice-l10n-fi && cp /usr/share/applications/libreoffice-startcenter.desktop $HOME/Desktop
2024-10-25 02:42:48 +03:00
# GIMP
2024-10-25 05:06:43 +03:00
RUN apt-get install -y gimp && cp /usr/share/applications/gimp.desktop $HOME/Desktop
2024-10-25 02:42:48 +03:00
# VSCodium
RUN \
apt-get install codium \
2024-10-25 05:06:43 +03:00
&& sed -i 's#/usr/share/codium/codium#/usr/share/codium/codium --no-sandbox##' /usr/share/applications/codium.desktop \
&& cp /usr/share/applications/codium.desktop $HOME/Desktop
# Obsidian
RUN \
curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest \
| grep "browser_download_url.*amd64.deb" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -i - -O obsidian.deb \
&& dpkg -i obsidian.deb \
&& sed -i 's#/opt/Obsidian/obsidian#/opt/Obsidian/obsidian --no-sandbox##' /usr/share/applications/obsidian.desktop \
&& cp /usr/share/applications/obsidian.desktop $HOME/Desktop \
&& rm obsidian.deb
2024-10-25 02:42:48 +03:00
# Desktop icons
RUN \
cp \
2024-10-25 05:06:43 +03:00
/usr/share/applications/xfce4-terminal.desktop \
$HOME/Desktop \
2024-10-25 02:42:48 +03:00
&& chmod +x $HOME/Desktop/*.desktop \
&& chown 1000:1000 $HOME/Desktop/*.desktop
2024-10-25 05:06:43 +03:00
# Configs
COPY etc /etc/
COPY user-config $HOME/.config
COPY bg_default.png /usr/share/backgrounds/bg_default.png
2024-10-25 02:42:48 +03:00
# Cleanup and stuff
# Services we don't want to start disable in xfce init
RUN \
rm -f \
/etc/xdg/autostart/blueman.desktop \
/etc/xdg/autostart/geoclue-demo-agent.desktop \
/etc/xdg/autostart/gnome-keyring-pkcs11.desktop \
/etc/xdg/autostart/gnome-keyring-secrets.desktop \
/etc/xdg/autostart/gnome-keyring-ssh.desktop \
/etc/xdg/autostart/gnome-shell-overrides-migration.desktop \
/etc/xdg/autostart/light-locker.desktop \
/etc/xdg/autostart/org.gnome.Evolution-alarm-notify.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.A11ySettings.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.Color.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.Datetime.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.Housekeeping.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.Keyboard.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.MediaKeys.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.Power.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.PrintNotifications.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.Rfkill.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.ScreensaverProxy.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.Sharing.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.Smartcard.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.Sound.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.UsbProtection.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.Wacom.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.Wwan.desktop \
/etc/xdg/autostart/org.gnome.SettingsDaemon.XSettings.desktop \
/etc/xdg/autostart/pulseaudio.desktop \
/etc/xdg/autostart/xfce4-power-manager.desktop \
/etc/xdg/autostart/xfce4-screensaver.desktop \
/etc/xdg/autostart/xfce-polkit.desktop \
/etc/xdg/autostart/xscreensaver.desktop
# Bins we don't want in the final image
RUN \
if which gnome-keyring-daemon; then \
rm -f $(which gnome-keyring-daemon); \
fi
# File cleanups
RUN \
rm -Rf \
/home/kasm-default-profile/.cache \
/home/kasm-user/.cache \
/tmp \
/var/lib/apt/lists/* \
/var/tmp/* \
&& mkdir -m 1777 /tmp
2024-10-24 21:56:06 +03:00
2024-10-25 02:42:48 +03:00
# Finalize
2024-10-24 21:56:06 +03:00
RUN \
$STARTUPDIR/set_user_permission.sh $HOME && \
rm -f /etc/X11/xinit/Xclients && \
chown 1000:0 $HOME && \
mkdir -p /home/kasm-user && \
chown -R 1000:0 /home/kasm-user && \
rm -Rf ${INST_DIR}
# Userspace Runtime
ENV HOME /home/kasm-user
WORKDIR $HOME
USER 1000
CMD ["--tail-log"]