mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-25 17:24:38 +01:00
The qemu and qemu-virtiofs Dockerfile files repeat the code to apply patches based on QEMU stable branch being built. Instead, this adds a common script (qemu/apply_patches.sh) and make it called by the respective Dockerfile files. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
61 lines
1.3 KiB
Docker
61 lines
1.3 KiB
Docker
from ubuntu:20.04
|
|
|
|
ARG QEMU_REPO
|
|
# commit/tag/branch
|
|
ARG QEMU_VERSION
|
|
ARG QEMU_TARBALL
|
|
ARG PREFIX
|
|
|
|
WORKDIR /root/qemu
|
|
RUN apt-get update && apt-get upgrade -y
|
|
RUN apt-get --no-install-recommends install -y \
|
|
apt-utils \
|
|
autoconf \
|
|
automake \
|
|
bc \
|
|
bison \
|
|
ca-certificates \
|
|
cpio \
|
|
flex \
|
|
gawk \
|
|
libaudit-dev \
|
|
libblkid-dev \
|
|
libcap-dev \
|
|
libcap-ng-dev \
|
|
libdw-dev \
|
|
libelf-dev \
|
|
libffi-dev \
|
|
libglib2.0-0 \
|
|
libglib2.0-dev \
|
|
libglib2.0-dev git \
|
|
libltdl-dev \
|
|
libmount-dev \
|
|
libpixman-1-dev \
|
|
libpmem-dev \
|
|
libselinux1-dev \
|
|
libtool \
|
|
make \
|
|
pkg-config \
|
|
pkg-config \
|
|
python \
|
|
python-dev \
|
|
rsync \
|
|
zlib1g-dev
|
|
|
|
RUN cd .. && git clone "${QEMU_REPO}" qemu
|
|
RUN git checkout "${QEMU_VERSION}"
|
|
RUN git clone https://github.com/qemu/capstone.git capstone
|
|
RUN git clone https://github.com/qemu/keycodemapdb.git ui/keycodemapdb
|
|
|
|
ADD scripts/configure-hypervisor.sh /root/configure-hypervisor.sh
|
|
ADD qemu /root/kata_qemu
|
|
|
|
RUN /root/kata_qemu/apply_patches.sh
|
|
|
|
RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | xargs ./configure \
|
|
--with-pkgversion=kata-static
|
|
|
|
RUN make -j$(nproc)
|
|
RUN make install DESTDIR=/tmp/qemu-static
|
|
RUN cd /tmp/qemu-static && tar -czvf "${QEMU_TARBALL}" *
|