mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 04:56:58 +02:00
They were previously in /usr/share/docker/contrib which means they were deleted at build time and not shipped into Docker sysext. New ebuild version of Docker now provides those two files as symlinks to /usr/share/docker/contrib from /usr/bin. We can't really remove symlinks using find as docker-runc, docker-containerd, etc. are broken symlinks too during the build phase. Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
22 lines
1008 B
Bash
Executable File
22 lines
1008 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/"
|
|
# For Docker 27.2.1, two files are symlinked to /usr/share/docker/contrib
|
|
# There were previously shipped directly in /usr/share/docker/contrib folder
|
|
rm -f "${rootfs}/usr/bin/dockerd-rootless-setuptool.sh" "${rootfs}/usr/bin/dockerd-rootless.sh"
|
|
|
|
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}'"
|
|
# ATTENTION: don't preserve ownership as repo is owned by sdk user
|
|
cp -vdR --preserve=mode,timestamps "${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"
|