mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-05-03 14:07:24 +00:00
static-build/qemu-virtiofs: Refactor apply virtiofs patches
In static-build/qemu-virtiofs/Dockerfile the code which applies the virtiofs specific patches is spread in several RUN instructions. Refactor this code so that it runs in a single RUN and produce a single overlay image. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
parent
512b38cf61
commit
ce675075e1
@ -54,10 +54,11 @@ ADD qemu /root/kata_qemu
|
|||||||
# Apply experimental specific patches
|
# Apply experimental specific patches
|
||||||
# Patches to quick fix virtiofs fork
|
# Patches to quick fix virtiofs fork
|
||||||
ENV VIRTIOFS_PATCHES_DIR=/root/kata_qemu/patches/${QEMU_VIRTIOFS_TAG}/
|
ENV VIRTIOFS_PATCHES_DIR=/root/kata_qemu/patches/${QEMU_VIRTIOFS_TAG}/
|
||||||
RUN find "${VIRTIOFS_PATCHES_DIR}" -name '*.patch' -type f |sort -t- -k1,1n > patches_virtiofs
|
RUN if [ -d ${VIRTIOFS_PATCHES_DIR} ]; then \
|
||||||
RUN echo "Patches to apply for virtiofs fixes:"
|
echo "Patches to apply for virtiofs fixes:"; \
|
||||||
RUN cat patches_virtiofs
|
for patch in $(find "${VIRTIOFS_PATCHES_DIR}" -name '*.patch' -type f |sort -t- -k1,1n); do \
|
||||||
RUN [ ! -s patches_virtiofs ] || git apply $(cat patches_virtiofs)
|
git apply $patch; \
|
||||||
|
done;fi
|
||||||
RUN /root/kata_qemu/apply_patches.sh
|
RUN /root/kata_qemu/apply_patches.sh
|
||||||
|
|
||||||
RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | sed -e 's|--disable-seccomp||g' | xargs ./configure \
|
RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | sed -e 's|--disable-seccomp||g' | xargs ./configure \
|
||||||
|
Loading…
Reference in New Issue
Block a user