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

luks: implements support for centos

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2023-02-28 12:01:18 +01:00
committed by Adphi
parent 2f34e19636
commit 4780228c95
3 changed files with 59 additions and 28 deletions

View File

@ -7,12 +7,20 @@ RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
RUN yum update -y
RUN yum install -y kernel systemd NetworkManager e2fsprogs sudo && \
RUN yum install -y \
kernel \
systemd \
NetworkManager \
e2fsprogs \
{{- if .Luks }}
cryptsetup \
{{- end }}
sudo && \
systemctl enable NetworkManager && \
systemctl unmask systemd-remount-fs.service && \
systemctl unmask getty.target
RUN dracut --no-hostonly --regenerate-all --force && \
RUN dracut --no-hostonly --regenerate-all --force {{ if .Luks }}--install="/usr/sbin/cryptsetup"{{ end }}&& \
cd /boot && \
ln -s $(find . -name 'vmlinuz-*') vmlinuz && \
ln -s $(find . -name 'initramfs-*.img') initrd.img