mirror of
https://github.com/linka-cloud/d2vm.git
synced 2024-11-25 00:56:25 +00:00
19 lines
541 B
Docker
19 lines
541 B
Docker
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-*
|
|
|
|
RUN yum update -y && \
|
|
yum install -y kernel systemd
|
|
|
|
RUN systemctl preset-all && \
|
|
systemctl enable getty@ttyS0
|
|
|
|
RUN cd /boot && \
|
|
ln -s $(find . -name 'vmlinuz-*') vmlinuz && \
|
|
ln -s $(find . -name 'initramfs-*.img') initrd.img
|
|
|
|
RUN echo "root:{{- if .Password}}{{ .Password}}{{- else}}root{{- end}}" | chpasswd
|