[PATCH v2 1/1] Dockerfile: provide kernel for libguestfs-tools

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Jul 14 08:18:56 CEST 2020


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 <xypron.glpk at gmx.de>
---
v2:
	add link to Ubuntu bug report
---
 Dockerfile | 4 ++++
 1 file changed, 4 insertions(+)

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

--
2.27.0



More information about the U-Boot mailing list