From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6462216095917932544 X-Received: by 10.46.5.11 with SMTP id 11mr347501ljf.22.1504601933409; Tue, 05 Sep 2017 01:58:53 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.25.202.74 with SMTP id h10ls56483lfj.46.gmail; Tue, 05 Sep 2017 01:58:53 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7tXz8L7yIwEnowVLY6wLz3AIkxDdQcsVumYGfvHQTIzTu6wOamqGX7eY4GBvaRVFhG8kxg X-Received: by 10.25.77.17 with SMTP id a17mr275764lfb.21.1504601933043; Tue, 05 Sep 2017 01:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504601932; cv=none; d=google.com; s=arc-20160816; b=AsZIGyh7TUCEGM2bApRNn5DlNdXer1tPkgLjuTML15KiV5VKaLGs60aLeN1VMQwRjO sQifhBavSbG9ETcrko3PxCE8ZOY/xDPmsnViFr83BA5uNOKlL++FNtA4lD2iy7nehV85 S4SiZ7Lw1Dp9LjP6RrNxpQKhTqr22G/FCM3zFzsbT3du/khhdtUpHJdXwU0g8kvf+5xe zwSNB7vdVQLKt1JoD9aXID8FbK+x/jxhmyEYSlYGHtTgE+vxdI9F5WM8Be71JwQvM8f/ ASKdl2DBuEJ1pS4RKgPZREcmN/hhuSIiihiWptU+JokrtrSKOTRCmt9jz8QkaFdFF7iE ivvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:mime-version:user-agent :date:message-id:subject:from:cc:to:arc-authentication-results; bh=Mhug+5jo6THSFM+1tqot5TFB4HBAmZvsZkAkuVxX1xs=; b=djOKVZT7hCskT1lSGOcllLry2pkatgptjzkFacqqsR92eV3pBgsyMT1NLpwcVY1P+Y Pjm4oYV9K04QXKsnpoXr/qPknPK6FXA+EQQTV/fr+CWjl7BXhetyaVLdP2IOPEd4NEYQ 1B80XpUXx6bjV2d4TnFnntF2WOb3D0Jc2SmzfhVS/uYDCjEcp2eCuNr6H3lZ2ZjlteAM fgcHXSPDMjJFw2i57UpFbB2Krez75hU+F+pu8uUvNyR0+wI03scjsTPi2li13CNi1g7m qlids+t4dDQK15LH3pjXqdMlyZLImUdRTapNGh8XD0H+1edIpGcyZRRm6R5BZmTvmy/N aBCg== 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 74si1684wmf.8.2017.09.05.01.58.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Sep 2017 01:58:52 -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 v858wqQH019502 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Sep 2017 10:58:52 +0200 Received: from md1f2u6c.ww002.siemens.net ([139.25.68.37]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v858wqsQ003273; Tue, 5 Sep 2017 10:58:52 +0200 To: kas-devel Cc: isar-users From: Jan Kiszka Subject: [PATCH] docker: Add binfmt-support for Isar cross-building Message-ID: <348408c2-36e7-1cf4-415c-7cd9a91a2314@siemens.com> Date: Tue, 5 Sep 2017 10:58:52 +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 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: ctcctfWdxnwv 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 -- 2.12.3