148 lines
5.9 KiB
Docker
148 lines
5.9 KiB
Docker
FROM registry.fedoraproject.org/fedora-bootc:44
|
|
|
|
#Install copr command
|
|
RUN dnf5 install 'dnf5-command(copr)' -y \
|
|
&& dnf copr enable yannmasoch/nautilus-my-computer -y
|
|
|
|
#Ajout du dépot mullvad
|
|
RUN curl -fsSL https://repository.mullvad.net/rpm/stable/mullvad.repo -o /etc/yum.repos.d/mullvad.repo
|
|
|
|
#Ajout du dépot Terra (Umbriel n'est pas dans les depots Fedora)
|
|
RUN dnf install -y --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release \
|
|
&& dnf clean all
|
|
|
|
#Install de GNOME + stack Noctalia/Umbriel avec support hardware + Podman + Cups + Vulkan driver + Plymouth + dev tools + divers utilitaires
|
|
RUN dnf install -y --refresh --setopt=tsflags=nodocs \
|
|
@gnome-desktop \
|
|
@hardware-support \
|
|
@development-tools \
|
|
@multimedia \
|
|
vulkan-tools \
|
|
ffmpegthumbnailer \
|
|
mesa-vulkan-drivers \
|
|
nautilus-my-computer \
|
|
mesa-vulkan-drivers.i686 \
|
|
vulkan-loader \
|
|
vulkan-loader.i686 \
|
|
vulkan-tools \
|
|
glibc-langpack-fr \
|
|
langpacks-core-fr \
|
|
langpacks-fr \
|
|
distrobox \
|
|
buildah \
|
|
podman \
|
|
rsync \
|
|
podman-docker \
|
|
podman-compose \
|
|
fuse-overlayfs \
|
|
cups \
|
|
cups-pdf \
|
|
jq \
|
|
mullvad-vpn \
|
|
noctalia \
|
|
umbriel-nightly \
|
|
xdg-desktop-portal-umbriel-nightly \
|
|
plymouth \
|
|
plymouth-system-theme \
|
|
plymouth-plugin-label \
|
|
plymouth-plugin-fade-throbber \
|
|
wget \
|
|
kernel-modules \
|
|
kernel-modules-extra \
|
|
SDL2 \
|
|
evtest \
|
|
libusb \
|
|
usbutils \
|
|
gstreamer1 \
|
|
gstreamer1-plugins-base \
|
|
gstreamer1-vaapi \
|
|
ffmpeg \
|
|
flatpak \
|
|
&& (dnf remove -y alacritty waybar gnome-software gnome-software-rpm-ostree gnome-system-monitor showtime decibels snapshot PackageKit PackageKit-gstreamer-plugin PackageKit-command-not-found toolbox || true) \
|
|
&& dnf install -y flatpak \
|
|
&& dnf clean all
|
|
|
|
#Configuration de GDM : clavier FR (GNOME Initial Setup cree le premier compte au boot)
|
|
COPY config/xorg-keyboard.conf /etc/X11/xorg.conf.d/00-keyboard.conf
|
|
|
|
#Installation de Filen Desktop
|
|
RUN wget https://cdn.filen.io/@filen/desktop/release/latest/Filen_linux_x86_64.rpm -O /tmp/filen.rpm \
|
|
&& dnf install -y --setopt=tsflags=nodocs /tmp/filen.rpm \
|
|
&& dnf clean all \
|
|
&& rm -f /tmp/filen.rpm
|
|
|
|
#SELinux : dans certains environnements de build (buildah rootful/overlay), les
|
|
#transactions semodule des scriptlets rpm echouent (sandbox /etc/selinux/targeted/tmp)
|
|
#et le module flatpak n'arrive jamais dans le store -> le helper reste unlabeled_t.
|
|
#On (re)installe explicitement le module puis on recompile la politique, en
|
|
#meilleur effort pour ne pas casser le build.
|
|
RUN rm -rf /etc/selinux/targeted/tmp; \
|
|
semodule -i /usr/share/selinux/packages/flatpak.pp.bz2 \
|
|
|| echo "AVERTISSEMENT: module SELinux flatpak non installe"; \
|
|
semodule -n -B \
|
|
|| { echo "AVERTISSEMENT: politique SELinux non recompilee dans ce build"; ls -la /etc/selinux/targeted; }; \
|
|
true
|
|
|
|
#Relabelle /usr depuis les file_contexts du store : rpm peut installer un binaire
|
|
#(flatpak-system-helper) avant que le module SELinux de son paquet ne soit pris en
|
|
#compte, et le fichier reste sans label. Comme /usr est en lecture seule sur le
|
|
#systeme deploye, le label doit etre correct dans l'image.
|
|
RUN setfiles -r / -F /etc/selinux/targeted/active/file_contexts /usr/libexec /usr/bin /usr/sbin \
|
|
|| echo "AVERTISSEMENT: relabel partiel de /usr"
|
|
|
|
#Installation de starship
|
|
RUN curl -sS https://starship.rs/install.sh | sh -s -- -y
|
|
|
|
#Installation des polices FiraMono Nerd Font
|
|
RUN mkdir -p /usr/share/fonts/firamono-nerd && \
|
|
cd /usr/share/fonts/firamono-nerd && \
|
|
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/FiraMono.zip && \
|
|
unzip FiraMono.zip && \
|
|
rm FiraMono.zip && \
|
|
fc-cache -fv
|
|
|
|
#Configuration de starship pour tous les utilisateurs
|
|
RUN echo 'eval "$(starship init bash)"' >> /etc/bashrc
|
|
|
|
#Configuration par défaut de starship pour tous les utilisateurs
|
|
RUN mkdir -p /etc/skel/.config && \
|
|
starship preset nerd-font-symbols -o /etc/skel/.config/starship.toml
|
|
|
|
#Configuration Umbriel par défaut : config de départ du paquet + autostart Noctalia
|
|
COPY config/umbriel.toml /etc/xdg/umbriel/config.toml
|
|
|
|
#Langue FR par défaut + Fuse userns + Timezone Paris
|
|
RUN echo "LANG=fr_FR.UTF-8" > /etc/locale.conf \
|
|
&& echo "KEYMAP=fr" > /etc/vconsole.conf \
|
|
&& ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime \
|
|
&& echo "user.max_user_namespaces=28633" > /etc/sysctl.d/userns.conf
|
|
|
|
# Installation du pack d'icones MoreWaita
|
|
RUN git clone https://github.com/somepaulo/MoreWaita.git && cd MoreWaita && ./install.sh && \
|
|
rm -rf MoreWaita && \
|
|
printf "[org/gnome/desktop/interface]\nicon-theme='MoreWaita'\n" > /etc/dconf/db/local.d/02-icon-theme && \
|
|
dconf update 2>/dev/null || true
|
|
|
|
#Configuration des fenêtres gnome pour avoir les btns style windows
|
|
RUN mkdir -p /etc/dconf/db/local.d /etc/dconf/profile && \
|
|
printf "[org/gnome/desktop/wm/preferences]\nbutton-layout=':minimize,maximize,close'\n" > /etc/dconf/db/local.d/02-window-buttons && \
|
|
printf "user-db:user\nsystem-db:local\n" > /etc/dconf/profile/user && \
|
|
dconf update 2>/dev/null || true
|
|
|
|
#Activation du module xpad pour support manette xbox
|
|
RUN echo "xpad" > /etc/modules-load.d/xpad.conf
|
|
|
|
#Le depot flathub est ajoute au premier demarrage (voir flatpak-first-boot.service) :
|
|
#ecrire dans /var pendant le build est un anti-patron bootc (mauvais labels SELinux).
|
|
|
|
#Activation du service flatpak-first-boot (active apres preset-all, plus bas)
|
|
COPY services/flatpak-first-boot.service /etc/systemd/system/flatpak-first-boot.service
|
|
|
|
#Définir le target graphique par défaut
|
|
RUN systemctl set-default graphical.target
|
|
|
|
#Activation des services + Desactivation de bootc-update automatique
|
|
RUN systemctl preset-all && \
|
|
systemctl enable --force gdm.service NetworkManager.service bluetooth.service podman.socket cups.service mullvad-daemon.service flatpak-first-boot.service && \
|
|
systemctl mask bootc-fetch-apply-updates.timer systemd-remount-fs.service
|