mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 05:26:58 +02:00
This change removes Flatcar specific builds of docker[-cli], containerd, runc, and cri-tools and instead switches to upstream Gentoo ebuilds added to portage-stable. The change updates docker to 24.0.6. NOTE that there currently is no upstream ebuild for containerd-1.7.7, so this change adds that ebuild based on the upstream containerd-1.7.6 ebuild. Flatcar customisations like systemd units etc. are now applied in the manglefs script of the respective sysexts, based on file system trees in coreos-overlay/coreos/sysext/(containerd|docker). The build_sysext script has been extended by an option to strip all binaries in a sysext; the option is active by default. This takes care of removing debug symbols from docker and containerd - which are not removed by the default Gentoo build. The overall size of both containerd and docker sysext is reduced by ~50%. Lastly, the sysext command line syntax of build_image has been extended to allow specifying multiple packages for a sysext. This was necessary because docker-cli and docker do not have any runtime relationships and therefore must both be specified for installation to correctly mirror Flatcar's own docker packaging. Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
19 lines
710 B
Bash
Executable File
19 lines
710 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
rootfs="${1}"
|
|
|
|
|
|
# No manpages on Flatcar, no need to ship "stress" tool
|
|
echo ">>> NOTICE: $0: removing 'gen-manpages', 'containerd-stress' from sysext"
|
|
rm -f "${rootfs}/usr/bin/gen-manpages" "${rootfs}/usr/bin/containerd-stress"
|
|
|
|
script_root="$(cd "$(dirname "$0")/../"; pwd)"
|
|
files_dir="${script_root}/sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd"
|
|
|
|
echo ">>> NOTICE $0: installing extra files from '${files_dir}'"
|
|
cp -va "${files_dir}/"* "${rootfs}"
|
|
|
|
mkdir -p "${rootfs}/usr/lib/systemd/system/multi-user.target.d"
|
|
{ echo "[Unit]"; echo "Upholds=containerd.service"; } > "${rootfs}/usr/lib/systemd/system/multi-user.target.d/10-containerd-service.conf"
|