2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2026-01-24 02:25:04 +00:00

feat: add AlmaLinux and Rocky Linux support

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2026-01-22 09:51:04 +01:00
parent 1e58d4dc42
commit 6e54c731a4
11 changed files with 42 additions and 17 deletions

View File

@@ -2,9 +2,7 @@ FROM {{ .Image }} AS rootfs
USER root
{{ $version := atoi .Release.VersionID }}
{{ if le $version 8 }}
{{ if and (eq .Release.ID "centos") (le (atoi .Release.VersionID) 8) }}
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
{{ end }}
@@ -19,6 +17,7 @@ RUN yum install -y \
systemctl enable NetworkManager && \
systemctl unmask systemd-remount-fs.service && \
systemctl unmask getty.target && \
mkdir -p /boot && \
find /boot -type l -exec rm {} \;
{{- if .GrubBIOS }}