All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 0/2] Support building qemu-user powered docker test images
@ 2016-05-26 14:27 Alex Bennée
  2016-05-26 14:27 ` [Qemu-devel] [RFC PATCH 1/2] tests/docker/docker.py: support --qemu option Alex Bennée
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Alex Bennée @ 2016-05-26 14:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: famz, peter.maydell, neil.williams, steve.mcintyre, riku.voipio,
	Alex Bennée

Hi,

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 \
    ./tests/docker/dockerfiles/debian-bootstrap.docker

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
root@e659ddf8232c:/# 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?

Cheers,


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

-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-06-01  4:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-26 14:27 [Qemu-devel] [RFC PATCH 0/2] Support building qemu-user powered docker test images Alex Bennée
2016-05-26 14:27 ` [Qemu-devel] [RFC PATCH 1/2] tests/docker/docker.py: support --qemu option Alex Bennée
2016-05-27 11:28   ` Fam Zheng
2016-05-31 15:23     ` Alex Bennée
2016-06-01  3:00       ` Fam Zheng
2016-05-26 14:27 ` [Qemu-devel] [RFC PATCH 2/2] add debian-bootstrap.docker target Alex Bennée
2016-05-27 12:23   ` Fam Zheng
2016-05-31 15:27     ` Alex Bennée
2016-06-01  1:47       ` Fam Zheng
2016-06-01  4:27       ` [Qemu-devel] [RFC PATCH] docker: Support ".pre" script when building image Fam Zheng
2016-05-27 12:27 ` [Qemu-devel] [RFC PATCH 0/2] Support building qemu-user powered docker test images Fam Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.