qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 0/3] Support building qemu-user powered docke


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v2 0/3] Support building qemu-user powered docker test images
Date: Mon, 13 Jun 2016 19:11:35 +0800
User-agent: Mutt/1.6.1 (2016-04-27)

On Mon, 06/13 10:22, Alex Bennée wrote:
> 
> Fam Zheng <address@hidden> writes:
> 
> > On Wed, 06/08 17:35, Alex Bennée wrote:
> >> Hi,
> >>
> >> This is a re-spin of the previous series built on top of
> >> fam/docker.next. I've made the changes suggested in the last review
> >> and split the first patch apart to separate (and fix) the build
> >> directory changes first.
> >>
> >> Now it no longer messes with the docker file you can actually
> >> cross-build tests. First ensure you build the debian-bootstrap image:
> >>
> >>     DEB_ARCH=armhf DEB_TYPE=testing \
> >>       ./tests/docker/docker.py build qemu:debian-bootstrap \
> >>       ./tests/docker/dockerfiles/debian-bootstrap.docker \
> >>       --include-executable=./arm-linux-user/qemu-arm
> >
> > This can take long depending on the network - I had to explicitly use a 
> > close
> > mirror in the pre script to test this, not sure why the mirror redirector
> > doesn't work. Eventually I get this error once the pre script succeeds and
> > docker build starts:
> >
> > Sending build context to Docker daemon 235.1 MB
> > Step 1 : FROM scratch
> >  --->
> > Step 2 : ADD . /
> >  ---> 807bfa810b0c
> > Removing intermediate container e57ded00b227
> > Step 3 : RUN sed -i 's/in_target mount/echo not for docker in_target 
> > mount/g' /debootstrap/functions
> >  ---> Running in fd80232b38fc
> > rpc error: code = 2 desc = "oci runtime error: exec format error"
> >
> > IIUC the sed is an armhf binary? Is something missing in the docker file? I
> > cannot find where the copied qemu-arm is used...
> 
> Ahh I realise I missed out the implicit binfmt_misc needs to be set up.
> So on my Ubuntu system just having qemu-user installed means the host
> system binfmt_misc is set up for armhf binaries to run
> /usr/bin/qemu-arm. I haven't experimented with explicitly setting up
> binfmt_misc in the container because it was already working :-/

A question related to this: I assume if we add a debian image it has everything
to initialize the debootstrap? Then is it possible to convert everything in the
pre script into Dockerfile RUN directives? That way it's more self-contained,
and can benefit from the docker checksum trick provided in docker.py.

Not that I don't like the pre script in any way (actually I am imagining using
a pre script to bootstrap an osx cross build image).

Fam



reply via email to

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