Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install limited amount of modules for UKI Ubuntu #2566

Merged
merged 6 commits into from
Jun 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions images/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ RUN rm -rf /tmp/nohang.deb
# This target is aimed at UKI images and avoids to install GRUB and any other unnecesary packages
# to the image because there are limitations on the total size
FROM common AS systemd-boot
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
$(dpkg --print-architecture)-microcode \
iucode-tool \
kmod \
linux-base \
$(apt-cache search linux-image | grep -oP 'linux-image-\d+.\d+.\d+-\d+-generic' | sort -V | tail -1) \
$(apt-cache search linux-image | grep -oP 'linux-modules-\d+.\d+.\d+-\d+-generic' | sort -V | tail -1) \
&& apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/*

# This target is aimed at non-UKI images where size is not a concern
FROM common AS grub
Expand All @@ -131,6 +140,7 @@ RUN apt-get update \
FROM systemd-boot AS systemd-boot-amd64
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
intel-microcode \
shared-mime-info \
&& apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/*
FROM systemd-boot AS systemd-boot-arm64
Expand Down
Loading