mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 04:56: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>
18 lines
666 B
Bash
Executable File
18 lines
666 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
rootfs="${1}"
|
|
|
|
# Remove debug and contrib
|
|
echo ">>> NOTICE: $0: removing '/usr/lib/debug/', '/usr/share/docker/contrib' from sysext"
|
|
rm -rf "${rootfs}/usr/lib/debug/" "${rootfs}/usr/share/docker/contrib/"
|
|
|
|
script_root="$(cd "$(dirname "$0")/../"; pwd)"
|
|
files_dir="${script_root}/sdk_container/src/third_party/coreos-overlay/coreos/sysext/docker"
|
|
|
|
echo ">>> NOTICE $0: installing extra files from '${files_dir}'"
|
|
cp -va "${files_dir}/"* "${rootfs}"
|
|
|
|
mkdir -p "${rootfs}/usr/lib/systemd/system/sockets.target.d"
|
|
{ echo "[Unit]"; echo "Upholds=docker.socket"; } > "${rootfs}/usr/lib/systemd/system/sockets.target.d/10-docker-socket.conf"
|