From 9d6d6b95b75de56251d1e7042a1545e73b2eb83f Mon Sep 17 00:00:00 2001 From: Vicente Cheng Date: Tue, 18 Jun 2024 13:32:29 +0800 Subject: [PATCH] build: remove mkinitrd and fix docker create - use `dracut -f --regenerate-all` to replace mkinitrd because mkinitrd is deprecated - docker create now need command to run Signed-off-by: Vicente Cheng --- package/harvester-os/Dockerfile | 2 +- scripts/package-harvester-os | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package/harvester-os/Dockerfile b/package/harvester-os/Dockerfile index a8c90e37d..b73bbe464 100644 --- a/package/harvester-os/Dockerfile +++ b/package/harvester-os/Dockerfile @@ -9,7 +9,7 @@ RUN chmod 0600 /system/oem/* COPY harvester-release.yaml /etc/ -RUN mkinitrd +RUN dracut -f --regenerate-all ARG HARVESTER_PRETTY_NAME RUN sed -i "s/^PRETTY_NAME.*/PRETTY_NAME=\"$HARVESTER_PRETTY_NAME\"/g" /etc/os-release && \ diff --git a/scripts/package-harvester-os b/scripts/package-harvester-os index 4bc168727..671715489 100755 --- a/scripts/package-harvester-os +++ b/scripts/package-harvester-os @@ -78,7 +78,8 @@ then fi INITRD=$(docker run --rm ${HARVESTER_OS_IMAGE} readlink /boot/initrd) -docker create --cidfile=os-img-container ${HARVESTER_OS_IMAGE} +# we need to add entrypoint or the docker create failed in newer version +docker create --cidfile=os-img-container ${HARVESTER_OS_IMAGE} -- tail -f /dev/null docker cp $(