Files
kata-containers/static-build/qemu/Dockerfile
Julio Montes c79a01b3f9 static-build: upgrade the container before building qemu and nemu
Upgrade the container before building qemu and nemu in order to install
the latest fixes for the CVEs.

fixes #676

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-08-16 20:42:00 +00:00

58 lines
1.4 KiB
Docker

from ubuntu:18.04
ARG QEMU_REPO
# commit/tag/branch
ARG QEMU_VERSION
ARG PREFIX
WORKDIR /root/qemu
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y \
autoconf \
automake \
bc \
bison \
cpio \
flex \
gawk \
libaudit-dev \
libcap-dev \
libcap-ng-dev \
libdw-dev \
libelf-dev \
libglib2.0-0 \
libglib2.0-dev \
libglib2.0-dev git \
libltdl-dev \
libpixman-1-dev \
libtool \
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/patches/ /root/kata_qemu_patches
RUN \
cat VERSION; \
stable_branch=$(cat VERSION | awk 'BEGIN{FS=OFS="."}{print $1 "." $2 ".x"}');\
for patch in $(find /root/kata_qemu_patches/${stable_branch}/ -name '*.patch'); do\
echo "apply $patch";\
git apply "$patch"; \
done
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 kata-qemu-static.tar.gz *