2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2025-06-24 22:22:26 +00:00

centos-stream-9: fix Dockerfile template

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2024-07-09 18:32:19 +02:00
parent f711f8919d
commit e31bc93074
6 changed files with 26 additions and 12 deletions

View File

@ -2,8 +2,12 @@ FROM {{ .Image }}
USER root
{{ $version := atoi .Release.Version }}
{{ if le $version 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 }}
RUN yum update -y
@ -36,7 +40,7 @@ RUN dracut --no-hostonly --regenerate-all --force
{{- if not .Grub }}
RUN cd /boot && \
mv $(find . -name 'vmlinuz-*') /boot/vmlinuz && \
mv $(find {{ if le $version 8 }}.{{ else }}/{{ end }} -name 'vmlinuz*') /boot/vmlinuz && \
mv $(find . -name 'initramfs-*.img') /boot/initrd.img
{{- end }}