From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org, Doug Goldstein <cardoe@cardoe.com>
Subject: Re: [PATCH] automation: set architecture in docker files
Date: Tue, 14 Nov 2023 10:01:06 +0100 [thread overview]
Message-ID: <ZVM3Ujf1nsws3Mxr@macbook.local> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2311131608200.160649@ubuntu-linux-20-04-desktop>
On Mon, Nov 13, 2023 at 04:10:24PM -0800, Stefano Stabellini wrote:
> On Mon, 13 Nov 2023, Roger Pau Monne wrote:
> > Pass the desired architecture of the image in the FROM instruction if the
> > image is possibly multi-platform.
> >
> > This allows using the x86 Dockerfiles on OS X on arm64 hardware.
> >
> > No functional change intended.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>
> Although I am not opposed to this change, so far we have been using:
> arm64v8/alpine:3.18
>
> for x86 it is not specified but it would be:
> amd64/alpine:3.18
>
> Two options:
> 1) we add amd64/ everywhere and leave the arm containers alone
> 2) we change all containers, including the arm containers, to use the
> --platform option
>
> I don't think is a good idea to have 2 different ways to specify the
> architecture for x86 and arm containers
I'm not an expert on this, but attempting to use (2):
-FROM arm64v8/alpine:3.18
+FROM --platform=linux/arm64v8 alpine:3.18
Does not work for me:
% make -C automation/build alpine/3.18-arm64v8
docker build --pull -t registry.gitlab.com/xen-project/xen/alpine:3.18-arm64v8 -f alpine/3.18-arm64v8.dockerfile alpine
[+] Building 1.4s (3/3) FINISHED docker:desktop-linux
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from 3.18-arm64v8.dockerfile 0.0s
=> => transferring dockerfile: 818B 0.0s
=> ERROR [internal] load metadata for docker.io/library/alpine:3.18 1.4s
------
> [internal] load metadata for docker.io/library/alpine:3.18:
------
3.18-arm64v8.dockerfile:1
--------------------
1 | >>> FROM --platform=linux/arm64v8 alpine:3.18
2 | LABEL maintainer.name="The Xen Project" \
3 | maintainer.email="xen-devel@lists.xenproject.org"
--------------------
ERROR: failed to solve: alpine:3.18: no match for platform in manifest sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978: not found
make: *** [alpine/3.18-arm64v8] Error 1
That's why I've left the prefixed images alone.
I could prefix the x86 images with amd64/ if that's preferred, I
didn't try that option, as the Docker manual suggested using
--platform.
Thanks, Roger.
next prev parent reply other threads:[~2023-11-14 9:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 15:57 [PATCH] automation: set architecture in docker files Roger Pau Monne
2023-11-14 0:10 ` Stefano Stabellini
2023-11-14 9:01 ` Roger Pau Monné [this message]
2023-11-14 15:00 ` Anthony PERARD
2023-11-14 16:56 ` Roger Pau Monné
2023-11-14 21:47 ` Stefano Stabellini
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=ZVM3Ujf1nsws3Mxr@macbook.local \
--to=roger.pau@citrix.com \
--cc=cardoe@cardoe.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.