mirror of
https://github.com/linka-cloud/d2vm.git
synced 2026-01-24 02:25:04 +00:00
templates: improve docker build layers caching
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@@ -16,12 +16,6 @@ RUN yum install -y \
|
||||
kernel \
|
||||
systemd \
|
||||
NetworkManager \
|
||||
{{- if .GrubBIOS }}
|
||||
grub2 \
|
||||
{{- end }}
|
||||
{{- if .GrubEFI }}
|
||||
grub2 grub2-efi-x64 grub2-efi-x64-modules \
|
||||
{{- end }}
|
||||
e2fsprogs \
|
||||
sudo && \
|
||||
systemctl enable NetworkManager && \
|
||||
@@ -29,6 +23,13 @@ RUN yum install -y \
|
||||
systemctl unmask getty.target && \
|
||||
find /boot -type l -exec rm {} \;
|
||||
|
||||
{{- if .GrubBIOS }}
|
||||
RUN yum install -y grub2
|
||||
{{- end }}
|
||||
{{- if .GrubEFI }}
|
||||
RUN yum install -y grub2 grub2-efi-x64 grub2-efi-x64-modules
|
||||
{{- end }}
|
||||
|
||||
{{ if .Luks }}
|
||||
RUN yum install -y cryptsetup && \
|
||||
dracut --no-hostonly --regenerate-all --force --install="/usr/sbin/cryptsetup"
|
||||
|
||||
@@ -19,21 +19,22 @@ RUN ARCH="$([ "$(uname -m)" = "x86_64" ] && echo amd64 || echo arm64)"; \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
systemd-sysv \
|
||||
systemd \
|
||||
{{- if .Grub }}
|
||||
grub-common \
|
||||
grub2-common \
|
||||
{{- end }}
|
||||
{{- if .GrubBIOS }}
|
||||
grub-pc-bin \
|
||||
{{- end }}
|
||||
{{- if .GrubEFI }}
|
||||
grub-efi-${ARCH}-bin \
|
||||
{{- end }}
|
||||
dbus \
|
||||
iproute2 \
|
||||
isc-dhcp-client \
|
||||
iputils-ping
|
||||
|
||||
{{- if .Grub }}
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt install -y grub-common grub2-common
|
||||
{{- end }}
|
||||
{{- if .GrubBIOS }}
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt install -y grub-pc-bin
|
||||
{{- end }}
|
||||
{{- if .GrubEFI }}
|
||||
RUN ARCH="$([ "$(uname -m)" = "x86_64" ] && echo amd64 || echo arm64)"; \
|
||||
DEBIAN_FRONTEND=noninteractive apt install -y grub-efi-${ARCH}-bin
|
||||
{{- end }}
|
||||
|
||||
RUN systemctl preset-all
|
||||
|
||||
{{ if .Password }}RUN echo "root:{{ .Password }}" | chpasswd {{ end }}
|
||||
|
||||
Reference in New Issue
Block a user