Skip to content

Commit ae7c80c

Browse files
authored
PE-7610 remove unneeded kernel packages (#473)
1 parent 43adee3 commit ae7c80c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ubuntu-fips/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
FROM quay.io/kairos/kairos-init:v0.5.20 AS kairos-init
44

55
# Base ubuntu image (focal)
6-
FROM ubuntu:focal as base
6+
FROM ubuntu:focal AS base
77

88
ARG KAIROS_VERSION=v3.5.3
99

@@ -13,6 +13,8 @@ ENV DEBIAN_FRONTEND=noninteractive
1313
RUN --mount=type=bind,from=kairos-init,src=/kairos-init,dst=/kairos-init \
1414
/kairos-init -l debug -s install --version "${KAIROS_VERSION}"
1515

16+
RUN apt-get remove -y linux-base linux-image-generic-hwe-20.04 && apt-get autoremove -y
17+
1618
## THIS comes from the Ubuntu documentation: https://canonical-ubuntu-pro-client.readthedocs-hosted.com/en/latest/tutorials/create_a_fips_docker_image.html
1719
## I've just added "linux-image-fips" in the package list
1820
RUN --mount=type=secret,id=pro-attach-config \
@@ -58,6 +60,7 @@ RUN --mount=type=secret,id=pro-attach-config \
5860
iproute2 \
5961
iptables \
6062
isc-dhcp-common \
63+
isc-dhcp-client \
6164
jq \
6265
kbd \
6366
krb5-locales \
@@ -108,9 +111,5 @@ COPY dracut.conf /etc/dracut.conf.d/kairos-fips.conf
108111
RUN --mount=type=bind,from=kairos-init,src=/kairos-init,dst=/kairos-init \
109112
/kairos-init -l debug -s init --version "${KAIROS_VERSION}"
110113

111-
RUN apt-get update && apt-get install -y --no-install-recommends dracut dracut-network isc-dhcp-common isc-dhcp-client cloud-guest-utils \
112-
&& apt-get remove -y unattended-upgrades && apt-get clean \
113-
&& rm -rf /var/lib/apt/lists/*
114-
115114
# Symlink kernel HMAC
116115
RUN kernel=$(ls /boot/vmlinuz-* | head -n1) && ln -sf ."${kernel#/boot/}".hmac /boot/.vmlinuz.hmac

0 commit comments

Comments
 (0)