From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6462216095917932544 X-Received: by 10.223.152.12 with SMTP id v12mr271977wrb.12.1504602029724; Tue, 05 Sep 2017 02:00:29 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.174.129 with SMTP id x123ls478769wme.3.gmail; Tue, 05 Sep 2017 02:00:29 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6ee8s49X7yGp7piSUL6XfqXd6SxpNueNaVzjnwGP4Ak1/DZayoQ5fcC0Xnz7Tzb8vc+F95 X-Received: by 10.28.184.133 with SMTP id i127mr335841wmf.20.1504602029373; Tue, 05 Sep 2017 02:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504602029; cv=none; d=google.com; s=arc-20160816; b=eSR/EdQkFYgtQYx7rbFAEIQn/6TJAz9ikYBH2MGsaNa3j5FspwbATjm+bXDHFEpFsN s4WW/XVaTuZ7dv9RDYmiDX2l8pTEoJL8trxu5xKvayVol0ZY7kovNCbHO4FLnRP8aAzp x5NM3sVovew3hIt98izBrNmsFmByh5BTRq2BwmRze5BQxSv9rST+e6XYIKs/8Zcf8JwT ssZEXkOfqwxvV/uhR5J3TsLo6aiCkQnDV4n4E9kgZEl52nl29+wgllEVphQ+bOZMS1G9 EEq7d2R+ZzVCt93AEpDhEtWyvpkYiv7wH4YfyIfc9qK0/+2G42ZhJ4/w59HeNMrYB1RF +LWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:references:cc:to:from:subject :arc-authentication-results; bh=kDognP0FDj1JNn/CCJDMvBVwemtKy55bVrLGd/72d+8=; b=wf85wE6FuotzTveqwnnD7HZkqhpIxXLdibFufEtppuxOJYhL6n+JqCqtdYCUZU5YDI eVy8F/dBRoR6t31VIjUavZpspZxyNkIRPHKJpDCWUvte0GymYDDEDpDDpBFp/eHdu7yF FbQKsN2eEis6B5oBQJrxnRWn7AP7s2rvbw5EP7ye34qvWKlSr0w4h8GCPhOyC+QjXCS7 qxog8w0wXsP2rC6smssF18Zod9n9bB6eILJETmj8imup4WnkX+Kp5pDlBRfkh+8LneG/ Aqp1PNNMTYd/IViL9npSIlrtwPw512wzetzDt3Oxx2rPzMmV96H1Wrxit0aYVtZ0hhwl SBsg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of jan.kiszka@siemens.com) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id s127si9718wme.8.2017.09.05.02.00.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Sep 2017 02:00:29 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of jan.kiszka@siemens.com) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of jan.kiszka@siemens.com) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id v8590S99023222 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Sep 2017 11:00:29 +0200 Received: from md1f2u6c.ww002.siemens.net ([139.25.68.37]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v8590SuA013373; Tue, 5 Sep 2017 11:00:28 +0200 Subject: Re: [PATCH] docker: Add binfmt-support for Isar cross-building From: Jan Kiszka To: kas-devel Cc: isar-users References: <348408c2-36e7-1cf4-415c-7cd9a91a2314@siemens.com> Message-ID: <3edc2496-a39d-bb6d-25da-b9760eebbae0@siemens.com> Date: Tue, 5 Sep 2017 11:00:28 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <348408c2-36e7-1cf4-415c-7cd9a91a2314@siemens.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: +QYhDx1aPKdg On 2017-09-05 10:58, [ext] Jan Kiszka wrote: > From: Jan Kiszka > > Additionally requires to run the container with --privileged - not nice but > unavoidable right now, see also > https://groups.google.com/forum/#!topic/isar-users/Un75m49InjY > > Also note that running containers with different binfmt settings > concurrently will cause troubles. Same for the case that the host > requires deviating settings. Use carefully. > > Signed-off-by: Jan Kiszka > --- > > Clearly no long-term solution, but as long as we need binfmt and want to > use Docker at least as packaging helper (not for isolation), this is > required. > > Dockerfile.isar | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Dockerfile.isar b/Dockerfile.isar > index 0119720..ea644b4 100644 > --- a/Dockerfile.isar > +++ b/Dockerfile.isar > @@ -10,7 +10,7 @@ RUN apt-get update && \ > apt-get install -y -f --no-install-recommends --target-release jessie \ > autoconf automake gdisk libtool bash-completion \ > sudo grub2 grub-efi-amd64-bin grub-efi-ia32-bin qemu-user-static \ > - reprepro python3 && \ > + reprepro python3 binfmt-support && \ > apt-get install -y -f --no-install-recommends --target-release jessie-backports \ > e2fsprogs && \ > apt-get install -y -f --no-install-recommends --target-release stretch \ > @@ -20,3 +20,5 @@ RUN apt-get update && \ > > RUN echo "builder ALL=NOPASSWD: ALL" > /etc/sudoers.d/builder-nopasswd && \ > chmod 660 /etc/sudoers.d/builder-nopasswd > + > +RUN sed -i "s|#!/bin/bash|\0\n\nupdate-binfmts --enable|" /kas/docker-entrypoint > I should have noted that I just successfully build an arm image inside a docker container this way. It boots in QEMU. Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux