@@ -105,21 +105,23 @@ RUN rm -rf /tmp/nohang.deb
105
105
106
106
# This target is aimed at UKI images and avoids to install GRUB and any other unnecesary packages
107
107
# to the image because there are limitations on the total size
108
+ # systemd-boot is neccesary as it brings the /usr/lib/systemd/systemd-bless-boot for boot assesment
108
109
FROM common AS systemd-boot
109
110
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
110
111
RUN apt-get update && apt-get install -y --no-install-recommends \
111
112
iucode-tool \
112
113
kmod \
113
114
linux-base \
115
+ systemd-boot \
114
116
&& apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/*
115
117
# for UKI, install the linux-modules pkg if no modules are found
116
118
RUN [ -z "$(ls -A /lib/modules/)" ] && apt-get update && apt-get install -y --no-install-recommends \
117
119
"$(apt-cache search linux-modules | grep -oP 'linux-modules-\d+.\d+.\d+-\d+-generic' | sort -V | tail -1)" \
118
- && apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/*
120
+ && apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/* || true
119
121
# for UKI, install the linux-image pkg if no kernel is found
120
122
RUN [ -z "$(ls -A /boot/vmlinuz*)" ] && apt-get update && apt-get install -y --no-install-recommends \
121
123
"$(apt-cache search linux-image | grep -oP 'linux-image-\d+.\d+.\d+-\d+-generic' | sort -V | tail -1)" \
122
- && apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/*
124
+ && apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/* || true
123
125
124
126
# This target is aimed at non-UKI images where size is not a concern
125
127
FROM common AS grub
@@ -141,17 +143,14 @@ RUN apt-get update \
141
143
142
144
FROM systemd-boot AS systemd-boot-amd64
143
145
RUN apt-get update \
144
- && apt-get install -y --no-install-recommends \
145
- shared-mime-info \
146
- && apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/*
146
+ && apt-get install -y --no-install-recommends shared-mime-info \
147
+ && apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/*
147
148
RUN [ -z "$(ls -A /lib/firmware/amd/)" ] && apt-get update && apt-get install -y --no-install-recommends \
148
- && apt-get install -y --no-install-recommends \
149
- amd64-microcode \
150
- && apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/*
149
+ && apt-get install -y --no-install-recommends amd64-microcode \
150
+ && apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/* || true
151
151
RUN [ -z "$(ls -A /lib/firmware/intel-ucode/)" ] && apt-get update && apt-get install -y --no-install-recommends \
152
- && apt-get install -y --no-install-recommends \
153
- intel-microcode \
154
- && apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/*
152
+ && apt-get install -y --no-install-recommends intel-microcode \
153
+ && apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/* || true
155
154
156
155
FROM systemd-boot AS systemd-boot-arm64
157
156
0 commit comments