From patchwork Tue Jul 14 06:18:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 241443 List-Id: U-Boot discussion From: xypron.glpk at gmx.de (Heinrich Schuchardt) Date: Tue, 14 Jul 2020 08:18:56 +0200 Subject: [PATCH v2 1/1] Dockerfile: provide kernel for libguestfs-tools Message-ID: <20200714061856.4487-1-xypron.glpk@gmx.de> The libguestfs-tools use QEMU to mount an image file. This requires a Linux kernel. On Ubuntu the kernel (/boot/vmlinuz*) is not readable for normal users (chmod 600), cf. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725 Install a kernel and make it readable for all users (chmod 644). Signed-off-by: Heinrich Schuchardt --- v2: add link to Ubuntu bug report --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) -- 2.27.0 diff --git a/Dockerfile b/Dockerfile index bc3cdee..aac7f01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,6 +68,7 @@ RUN apt-get update && apt-get install -y \ libssl-dev \ libudev-dev \ libusb-1.0-0-dev \ + linux-image-kvm \ lzma-alone \ lzop \ mount \ @@ -94,6 +95,9 @@ RUN apt-get update && apt-get install -y \ zip \ && rm -rf /var/lib/apt/lists/* +# libguestfs-tools runs the kernel via QEMU. Give normal users access. +RUN chmod 644 /boot/vmlinu* + # Manually install libmpfr4 for the toolchains RUN wget http://mirrors.kernel.org/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.4-1_amd64.deb && dpkg -i libmpfr4_3.1.4-1_amd64.deb && rm libmpfr4_3.1.4-1_amd64.deb