2022-04-19 12:01:08 +00:00
|
|
|
FROM {{ .Image }}
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
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-*
|
|
|
|
|
2022-04-21 16:28:50 +00:00
|
|
|
RUN yum update -y
|
2022-04-19 12:01:08 +00:00
|
|
|
|
2022-04-26 12:59:33 +00:00
|
|
|
RUN yum install -y kernel systemd NetworkManager e2fsprogs sudo && \
|
|
|
|
systemctl enable NetworkManager && \
|
|
|
|
systemctl unmask systemd-remount-fs.service && \
|
|
|
|
systemctl unmask getty.target
|
2022-04-19 12:01:08 +00:00
|
|
|
|
2022-04-21 16:28:50 +00:00
|
|
|
RUN dracut --no-hostonly --regenerate-all --force && \
|
|
|
|
cd /boot && \
|
2022-04-19 12:01:08 +00:00
|
|
|
ln -s $(find . -name 'vmlinuz-*') vmlinuz && \
|
|
|
|
ln -s $(find . -name 'initramfs-*.img') initrd.img
|
|
|
|
|
|
|
|
RUN echo "root:{{- if .Password}}{{ .Password}}{{- else}}root{{- end}}" | chpasswd
|