Skip to content

Commit 7ca5ab5

Browse files
committed
fix: shrink installer and imager images
Remove some files we don't need, remove some tools, move tools around. E.g. we don't need grub foreign architecture for the installer, as it only runs for a specific arch. Move kmod to imager. Drop `ctr` from containerd, as it was added to pkgs. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
1 parent ea0994c commit 7ca5ab5

3 files changed

Lines changed: 23 additions & 23 deletions

File tree

Dockerfile

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ COPY --link --from=pkg-apparmor-amd64 / /rootfs
726726
COPY --link --from=pkg-cni-stripped-amd64 / /rootfs
727727
COPY --link --from=pkg-flannel-cni-amd64 / /rootfs
728728
COPY --link --from=pkg-cryptsetup-amd64 / /rootfs
729-
COPY --link --from=pkg-containerd-amd64 / /rootfs
729+
COPY --link --exclude=usr/bin/ctr --from=pkg-containerd-amd64 / /rootfs
730730
COPY --link --from=pkg-dosfstools-amd64 / /rootfs
731731
COPY --link --from=pkg-e2fsprogs-amd64 / /rootfs
732732
COPY --link --from=pkg-systemd-udevd-amd64 / /rootfs
@@ -804,7 +804,7 @@ COPY --link --from=pkg-apparmor-arm64 / /rootfs
804804
COPY --link --from=pkg-cni-stripped-arm64 / /rootfs
805805
COPY --link --from=pkg-flannel-cni-arm64 / /rootfs
806806
COPY --link --from=pkg-cryptsetup-arm64 / /rootfs
807-
COPY --link --from=pkg-containerd-arm64 / /rootfs
807+
COPY --link --exclude=usr/bin/ctr --from=pkg-containerd-arm64 / /rootfs
808808
COPY --link --from=pkg-dosfstools-arm64 / /rootfs
809809
COPY --link --from=pkg-e2fsprogs-arm64 / /rootfs
810810
COPY --link --from=pkg-systemd-udevd-arm64 / /rootfs
@@ -990,18 +990,14 @@ ARG TARGETARCH
990990
ENV TARGETARCH=${TARGETARCH}
991991
COPY --link --from=pkg-fhs / /
992992
COPY --link --from=pkg-ca-certificates / /
993-
COPY --link --from=pkg-musl / /
993+
COPY --link --exclude=usr/include --from=pkg-musl / /
994994

995995
COPY --link --from=pkg-dosfstools / /
996-
COPY --link --from=pkg-grub / /
997-
COPY --link --from=pkg-grub-amd64 /usr/lib/grub /usr/lib/grub
998-
COPY --link --from=pkg-grub-arm64 /usr/lib/grub /usr/lib/grub
999-
COPY --link --from=pkg-kmod / /
1000-
COPY --link --from=pkg-libattr / /
1001-
COPY --link --from=pkg-libinih / /
1002-
COPY --link --from=pkg-liblzma / /
1003-
COPY --link --from=pkg-liburcu / /
1004-
COPY --link --from=pkg-openssl / /
996+
COPY --link --exclude=etc/bash_completion.d --from=pkg-grub / /
997+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-libattr / /
998+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-libinih / /
999+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-liblzma / /
1000+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-liburcu / /
10051001
COPY --link --from=pkg-xfsprogs / /
10061002
COPY --link --from=installer-image-gen /rootfs /
10071003

@@ -1017,20 +1013,24 @@ ENTRYPOINT ["/bin/installer"]
10171013

10181014
FROM installer-base-image-squashed AS imager-image
10191015
COPY --link --from=pkg-cpio / /
1020-
COPY --link --from=pkg-e2fsprogs / /
1021-
COPY --link --from=pkg-glib / /
1022-
COPY --link --from=pkg-libburn / /
1023-
COPY --link --from=pkg-libisoburn / /
1024-
COPY --link --from=pkg-libisofs / /
1016+
COPY --link --exclude=usr/lib/pkgconfig --from=pkg-e2fsprogs / /
1017+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-glib / /
1018+
COPY --link --from=pkg-grub-amd64 /usr/lib/grub /usr/lib/grub
1019+
COPY --link --from=pkg-grub-arm64 /usr/lib/grub /usr/lib/grub
1020+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --exclude=usr/share/pkgconfig --exclude=usr/share/bash-completion --from=pkg-kmod / /
1021+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-libburn / /
1022+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-libisoburn / /
1023+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-libisofs / /
10251024
COPY --link --from=pkg-mtools / /
1026-
COPY --link --from=pkg-pcre2 / /
1025+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --exclude=usr/lib/cmake --from=pkg-openssl / /
1026+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-pcre2 / /
10271027
COPY --link --from=pkg-pigz / /
10281028
COPY --link --from=pkg-qemu-tools / /
10291029
COPY --link --from=pkg-squashfs-tools / /
10301030
COPY --link --from=pkg-tar / /
1031-
COPY --link --from=pkg-xz / /
1032-
COPY --link --from=pkg-zlib / /
1033-
COPY --link --from=pkg-zstd / /
1031+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-xz / /
1032+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-zlib / /
1033+
COPY --link --exclude=usr/include --exclude=usr/lib/pkgconfig --from=pkg-zstd / /
10341034
COPY --chmod=0644 hack/extra-modules.conf /etc/modules.d/10-extra-modules.conf
10351035
COPY --from=install-artifacts / /
10361036

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ EMBED_TARGET ?= embed
2424
TOOLS_PREFIX ?= ghcr.io/siderolabs/tools
2525
TOOLS ?= v1.10.0-alpha.0-19-g87acb27
2626
PKGS_PREFIX ?= ghcr.io/siderolabs
27-
PKGS ?= v1.10.0-alpha.0-65-g990a9e8
27+
PKGS ?= v1.10.0-alpha.0-67-g668d25b
2828
EXTRAS ?= v1.10.0-alpha.0-4-gc201b87
2929

3030
KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest

pkg/machinery/gendata/data/pkgs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.10.0-alpha.0-65-g990a9e8
1+
v1.10.0-alpha.0-67-g668d25b

0 commit comments

Comments
 (0)