From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7vGH-0007oV-9K for qemu-devel@nongnu.org; Tue, 31 May 2016 21:47:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7vGE-0001u6-4R for qemu-devel@nongnu.org; Tue, 31 May 2016 21:47:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36907) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7vGD-0001u2-Uk for qemu-devel@nongnu.org; Tue, 31 May 2016 21:47:54 -0400 Date: Wed, 1 Jun 2016 09:47:50 +0800 From: Fam Zheng Message-ID: <20160601014750.GA7776@ad.usersys.redhat.com> References: <1464272863-2285-1-git-send-email-alex.bennee@linaro.org> <1464272863-2285-3-git-send-email-alex.bennee@linaro.org> <20160527122339.GB7880@ad.usersys.redhat.com> <87vb1u6yeh.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <87vb1u6yeh.fsf@linaro.org> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH 2/2] add debian-bootstrap.docker target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex =?iso-8859-1?Q?Benn=E9e?= Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org, neil.williams@linaro.org, steve.mcintyre@linaro.org, riku.voipio@linaro.org On Tue, 05/31 16:27, Alex Benn=E9e wrote: >=20 > Fam Zheng writes: >=20 > > On Thu, 05/26 15:27, Alex Benn=E9e wrote: > >> Together with some changes to the docker script you can now build an > >> arbitrary architecture of Debian using debootstrap. To achieve this = I > >> introduce the concept of a HOST_CMD in the docker config file. While > >> copying the file into workspace the HOST_CMD is run in the docker bu= ild > >> context. This allows debootstrap to set up its first stage before th= e > >> container is built. > > > > Could you instead introduce the concept of $IMAGE.pre file (in this c= ase > > debian-bootstrap.pre, aside debian-bootstrap.docker), and exec it in > > docker.py? It would be much more flexible, and we we wouldn't need t= o inject a > > custom directive to filter it out. >=20 > I'm ambivalent about that. To be honest this is a bit of a gap in > docker's image creation (or if there is a better more docker-y way of > doing things I couldn't find it). It does have the benefit of keeping > everything in one place. I don't like that it pollutes the dockerfile, rendering it invalid for ra= w "docker build", which is not very good. >=20 > We are copying the dockerfile to the build environment anyway so it > seemed natural to do the operation while copying across. How would > envison the .pre setup? A #! script we just exec inside the temp > directory we create? Yes, since I'm going to send a v7, I'll merge the tmp dir part in to my s= eries, and add a new patch for the "pre" idea to see if we like it. Fam