Accepting request 1072099 from home:vulyanov:branches:Virtualization
- Use qcow2 format to store the appliance rootfs OBS-URL: https://build.opensuse.org/request/show/1072099 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-libguestfs-tools-container?expand=0&rev=18
This commit is contained in:
parent
a2c6fb0328
commit
376010e355
24
Dockerfile
24
Dockerfile
@ -67,21 +67,25 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \
|
||||
zypper -n install qemu-arm qemu-uefi-aarch64 qemu-x86; \
|
||||
fi;
|
||||
|
||||
RUN zypper -n remove kubevirt-manifests && \
|
||||
# Make a "fixed appliance" for libguestfs.
|
||||
# Note: the resulting 'appliance/root' is a sparse file. Docker does not
|
||||
# preserve sparseness hence it is converted to qcow2.
|
||||
RUN mkdir -p /usr/local/lib/guestfs/appliance && \
|
||||
cd /usr/local/lib/guestfs/appliance && \
|
||||
LIBGUESTFS_BACKEND=direct LIBGUESTFS_DEBUG=1 libguestfs-make-fixed-appliance . && \
|
||||
qemu-img convert -c -O qcow2 root root.qcow2 && \
|
||||
mv root.qcow2 root && \
|
||||
touch done && \
|
||||
rm -rf /var/tmp/.guestfs-*
|
||||
|
||||
RUN zypper -n remove --clean-deps \
|
||||
kernel-kvmsmall \
|
||||
kubevirt-manifests && \
|
||||
zypper clean -a && \
|
||||
useradd -u 1001 --create-home -s /bin/bash virt-libguestfs-tools
|
||||
|
||||
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 && \
|
||||
mv appliance-*.tar.xz appliance.tar.xz && \
|
||||
rm -rf /var/tmp/.guestfs-*
|
||||
|
||||
USER 1001
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
|
@ -1,11 +1,3 @@
|
||||
#!/bin/bash -xe
|
||||
|
||||
#KubeVirt provides LIBGUESTFS_PATH via the pod environemnt.
|
||||
LIBGUESTFS_PATH=${LIBGUESTFS_PATH:-/tmp/guestfs}
|
||||
LIBGUESTFS_APPLIANCE=/appliance.tar.xz
|
||||
|
||||
mkdir -p ${LIBGUESTFS_PATH}
|
||||
tar -Jxf ${LIBGUESTFS_APPLIANCE} -C ${LIBGUESTFS_PATH} --strip-components=1
|
||||
touch ${LIBGUESTFS_PATH}/done
|
||||
|
||||
/bin/bash
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 2 18:15:49 UTC 2023 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||
|
||||
- Use qcow2 format to store the appliance rootfs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 16 07:29:29 UTC 2023 - Vasily Ulyanov <vasily.ulyanov@suse.com>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user