On Mon, 06/13 10:22, Alex Bennée wrote:
> 
> Fam Zheng <f...@redhat.com> 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