public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: kas-devel <kas-devel@googlegroups.com>
Cc: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] docker: Add binfmt-support for Isar cross-building
Date: Tue, 5 Sep 2017 11:00:28 +0200	[thread overview]
Message-ID: <3edc2496-a39d-bb6d-25da-b9760eebbae0@siemens.com> (raw)
In-Reply-To: <348408c2-36e7-1cf4-415c-7cd9a91a2314@siemens.com>

On 2017-09-05 10:58, [ext] Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> 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 <jan.kiszka@siemens.com>
> ---
> 
> 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

  reply	other threads:[~2017-09-05  9:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05  8:58 Jan Kiszka
2017-09-05  9:00 ` Jan Kiszka [this message]
2017-09-06 15:26   ` Daniel Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3edc2496-a39d-bb6d-25da-b9760eebbae0@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=kas-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox