-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathContainerfile
More file actions
41 lines (37 loc) · 2.23 KB
/
Copy pathContainerfile
File metadata and controls
41 lines (37 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Imagem única para montar uma instalação mínima do Fedora 44 com interface gráfica GNOME
FROM quay.io/fedora/fedora-bootc:44
COPY locale.conf post-install.sh pacotes_desktop pacotes_necessarios post-install.service vconsole.conf zram-generator.conf ./
RUN mkdir -vp /var/roothome /data /var/home && \
dnf5 -y upgrade --refresh --setopt=tsflags=nodocs && \
dnf5 -y install kernel-modules-extra wget --refresh --setopt=tsflags=nodocs && \
# Configurações de sistema
mv -v zram-generator.conf /usr/lib/systemd/zram-generator.conf.d/10-zram.conf || mv -v zram-generator.conf /etc/systemd/ && \
mv -v vconsole.conf /etc/vconsole.conf && \
mv -v locale.conf /etc/locale.conf && \
# Organização de diretórios e links simbólicos para persistência
rm -rvf /opt && mkdir -vp /var/opt && ln -vs /var/opt /opt && \
mkdir -vp /var/usrlocal && mv -v /usr/local/* /var/usrlocal/ 2>/dev/null && \
rm -rvf /usr/local && ln -vs /var/usrlocal /usr/local && \
# Script de pós-instalação
mv -v post-install.sh /usr/bin/post-install.sh && \
mv -v post-install.service /usr/lib/systemd/system/post-install.service && \
chmod +x /usr/bin/post-install.sh && \
systemctl enable post-install.service && \
dnf5 clean all && \
rm -rfv /var/cache/* /var/lib/* /var/log/* /var/tmp/*
# 3. Pacotes base do ambiente gráfico GNOME Minimalista (REMOVA ESSE BLOCO SE FOR USAR OUTRA INTERFACE GRÁFICA)
# E coloque os pacotes da outra interface no arquivo pacotes_desktop
RUN dnf5 install gnome-shell --setopt=tsflags=nodocs --setopt=install_weak_deps=False -y && \
dnf5 clean all && \
rm -rfv /var/cache/* /var/lib/dnf/* /var/log/* /tmp/* /var/tmp/*
# Instalação dos pacotes definidos nos arquivos de lista
RUN grep -v '^#' pacotes_necessarios | tr '\n' ' ' | xargs dnf5 install --setopt=tsflags=nodocs -y && \
grep -v '^#' pacotes_desktop | tr '\n' ' ' | xargs dnf5 install --setopt=tsflags=nodocs -y && \
systemctl mask systemd-remount-fs.service && \
systemctl enable spice-vdagentd.service && \
dnf5 clean all && \
rm -rfv /var/cache/* /var/lib/* /var/log/* /var/tmp/* \
/var/usrlocal/share/applications/mimeinfo.cache \
/var/roothome/.*
# Verificação da imagem
RUN bootc container lint