@@ -9,6 +9,12 @@ RUN KERNEL_VERSION="$(rpm -q kernel-core --queryformat '%{VERSION}-%{RELEASE}.%{
99# Segundo estágio: Configuração do sistema e imagem final
1010FROM quay.io/fedora/fedora-bootc:44 AS final
1111
12+ # Estrutura de diretórios necessários para home, opt e usr/local
13+ RUN mkdir -vp /var/roothome /data /var/home && \
14+ rm -rf /opt && mkdir -vp /var/opt && ln -vs /var/opt /opt && \
15+ mkdir -vp /var/usrlocal && \
16+ rm -rf /usr/local && ln -vs /var/usrlocal /usr/local && \
17+
1218# 1. Instalação dos módulos e drivers NVIDIA compilados (Via dnf download + rpm em /tmp)
1319COPY --from=builder /etc/yum.repos.d/fedora-nvidia-580.repo /etc/yum.repos.d/
1420COPY --from=builder /var/cache/akmods/nvidia/kmod-nvidia*.rpm /tmp/
@@ -36,11 +42,7 @@ COPY post-install.sh /usr/bin/post-install.sh
3642COPY post-install.service /usr/lib/systemd/system/post-install.service
3743
3844# 4. Estrutura de diretórios, compatibilidade bootc, permissões e serviços
39- RUN mkdir -vp /var/roothome /data /var/home && \
40- rm -rf /opt && mkdir -vp /var/opt && ln -vs /var/opt /opt && \
41- mkdir -vp /var/usrlocal && \
42- rm -rf /usr/local && ln -vs /var/usrlocal /usr/local && \
43- chmod +x /usr/bin/post-install.sh && \
45+ RUN chmod +x /usr/bin/post-install.sh && \
4446 systemctl enable post-install.service && \
4547 systemctl mask systemd-remount-fs.service && \
4648 systemctl mask akmods-keygen@akmods-keygen.service && \
0 commit comments