diff --git a/Dockerfile b/Dockerfile index 944c447..b0d7715 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,11 +30,14 @@ RUN zypper -n install \ jfsutils \ kernel-kvmsmall \ ldmtool \ + libguestfs \ + libguestfs-devel \ mdadm \ parted \ qemu-tools \ qemu-x86 \ reiserfs \ + supermin \ xfsprogs \ xorriso \ zerofree && \ @@ -43,4 +46,12 @@ RUN zypper -n install \ COPY entrypoint.sh /entrypoint.sh RUN chmod +x entrypoint.sh +# Make a "fixed appliance" for libguestfs. +# Note: the resulting 'appliance/root' is a sparse file. Docker does not +# preserve sparseness hence a compressed tarball is created. +RUN LIBGUESTFS_BACKEND=direct \ + LIBGUESTFS_DEBUG=1 \ + libguestfs-make-fixed-appliance --xz && \ + rm -rf /var/tmp/.guestfs-* + ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/entrypoint.sh b/entrypoint.sh index be4434b..7b27def 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,12 @@ #!/bin/bash -xe -# KubeVirt will provide LIBGUESTFS_PATH via the pod environemnt. Unset it so the -# default search paths are used. -unset LIBGUESTFS_PATH +#KubeVirt provides LIBGUESTFS_PATH via the pod environemnt. +DIR=/usr/local/lib/guestfs +LIBGUESTFS_VERSION=$(rpm -q --queryformat=%{version} libguestfs) +LIBGUESTFS_APPLIANCE=/appliance-${LIBGUESTFS_VERSION}.tar.xz + +mkdir -p ${DIR} +tar -Jxf ${LIBGUESTFS_APPLIANCE} -C ${DIR} +touch ${DIR}/done /bin/bash diff --git a/virt-libguestfs-tools-container.changes b/virt-libguestfs-tools-container.changes index 8f7794b..1cd5004 100644 --- a/virt-libguestfs-tools-container.changes +++ b/virt-libguestfs-tools-container.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 3 12:49:43 UTC 2022 - Vasily Ulyanov + +- Make a "fixed appliance" for libguestfs +- Explicitly install libguestfs{,-devel} and supermin + ------------------------------------------------------------------- Tue Aug 3 07:33:03 UTC 2021 - Vasily Ulyanov