[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH 0/2] Support building qemu-user powered docker t

From: Alex Bennée
Subject: [Qemu-devel] [RFC PATCH 0/2] Support building qemu-user powered docker test images
Date: Thu, 26 May 2016 15:27:41 +0100


I had a an set of scripts for setting up and running executable
binaries in a $arch-linux-user powered rootfs. However it has been a
while since I last used them and there was various breakage which
spurred me on to a better way. As Fam has been working with Docker
containers for building I investigated if we could use the docker
framework to make all the chroot/bind mount stuff go away.

A couple of caveats as befits an RFC:

  - built on top of Fam's docker series [PATCH v5 00/14] tests: Introducing 
docker tests
  - assumes binfmt_misc setup an set to /usr/bin/qemu-FOO
  - uses ldd to copy dynamically shared libs across
    - this should be OK for distro's that are multiarch safe

For example to build a Debian Testing armhf distro I run:

  DEB_ARCH=armhf DEB_TYPE=testing \
    ./tests/docker/docker.py build --qemu=qemu-arm debian:armhf \

This uses Fam's docker helper which now copies qemu-arm into the
docker build context, loads the debian-bootstrap.docker evaluating
HOST_CMD (to do the debootstrap) and then runs the build steps to make
the image. I can then run the final image with something like:

$ docker run -t -i --rm debian:armhf /bin/bash
address@hidden:/# uname -a
Linux e659ddf8232c 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37
UTC 2016 armv7l GNU/Linux

Obviously this requires Fam's stuff to go in and needs some clean-up
but is this worth pursuing?


Alex Bennée (2):
  tests/docker/docker.py: support --qemu option
  add debian-bootstrap.docker target

 tests/docker/docker.py                           | 77 +++++++++++++++++++++---
 tests/docker/dockerfiles/debian-bootstrap.docker | 22 +++++++
 2 files changed, 89 insertions(+), 10 deletions(-)
 create mode 100644 tests/docker/dockerfiles/debian-bootstrap.docker


reply via email to

[Prev in Thread] Current Thread [Next in Thread]